1
0
mirror of https://gitee.com/incloudcode/yexuejc-springboot.git synced 2025-09-28 10:53:21 +08:00

功能插件装配开关

This commit is contained in:
2019-07-27 09:27:32 +08:00
parent 83a20b010b
commit b93672f52f
12 changed files with 142 additions and 16 deletions

View File

@@ -1,7 +1,7 @@
功能目录
------------------------
### 第三方集成
### 第三方集成 -> [第三方集成具体使用](plugin/AutoConfigure.md)
#
* [redis 集成](REDIS.md)
* [Aliyun MNS 消息队列](MNS.md)

View File

@@ -4,19 +4,19 @@ keytool -genkey -alias lgfishing -keyalg RSA -keystore lgfishing2.keystore -keys
输入密钥库口令:
再次输入新口令:
您的名字与姓氏是什么?
[Unknown]: heikengdiaoyu.com
[Unknown]: 1107047387@qq.com
您的组织单位名称是什么?
[Unknown]: 深圳金大米网络科技有限公司-老G钓鱼
[Unknown]: yexuejc
您的组织名称是什么?
[Unknown]: 成都极致思维网络科技有限公司-老G钓鱼
[Unknown]: 成都极致思维网络科技有限公司
您所在的城市或区域名称是什么?
[Unknown]: 成都
您所在的省/市/自治区名称是什么?
[Unknown]: 四川
该单位的双字母国家/地区代码是什么?
[Unknown]: CN
CN=heikengdiaoyu.com, OU=深圳金大米网络科技有限公司-老G钓鱼, O=成都极致思维网络科技有限公司-老G钓鱼, L=成都, ST=四川, C=CN是否正确?
CN=1107047387@qq.com, OU=yexuejc, O=成都极致思维网络科技有限公司, L=成都, ST=四川, C=CN是否正确?
[否]: 是
```
#生成公钥
keytool -export -alias lgfishing -keystore lgfishing2.keystore -storepass lgfishing2018 -rfc -file lgfishing2.cer
keytool -export -alias test -keystore test.keystore -storepass test2018 -rfc -file test2018.cer

View File

@@ -0,0 +1,95 @@
本项目自动装配开关
---------------------
## 说明
本项目从2.1.0开始所有自动装配的功能增加开关控制,默认插件功能关闭.
开启需要在使用项目`application.properties`中增加`yexuejc.autoconfigure.mns.enable=true`类似的配置每一个插件功能key不一样
### 插件功能
注:使用阿里系的功能请引入阿里基础包
```
<!-- 阿里云基础SDK -->
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-core</artifactId>
<optional>true</optional>
</dependency>
```
#### 阿里云MNS功能
> 类:[MnsAutoConfiguration](../../yexuejc-springboot-base/src/main/java/com/yexuejc/springboot/base/autoconfigure/MnsAutoConfiguration.java)
> <br/> 功能开关:`yexuejc.autoconfigure.mns.enable=true`
> <br/> 依赖:`MNSClient.class`
> <br/> pom 引入
> ```
> <!-- 阿里云消息服务MNS相关SDK -->
> <dependency>
> <groupId>com.aliyun.mns</groupId>
> <artifactId>aliyun-sdk-mns</artifactId>
> <classifier>jar-with-dependencies</classifier>
> <optional>true</optional>
> </dependency>
> ```
>application.properties 配置
>```
> yexuejc.alibaba.mns.access-key-id=自己到阿里云申请access-key
> yexuejc.alibaba.mns.access-key-secret=自己到阿里云申请access-key-secret
> yexuejc.alibaba.mns.endpoint=自己阿里云的endpoint
> yexuejc.alibaba.mns.queue-name-prefix=mns前缀
>```
#### redis 多database 配置
> 类:[MutiRedisAutoConfiguration](../../yexuejc-springboot-base/src/main/java/com/yexuejc/springboot/base/autoconfigure/MutiRedisAutoConfiguration.java)
> <br/> 功能开关:`yexuejc.autoconfigure.redis.enable=true`
> <br/> 依赖:`JedisConnection.class`, `RedisOperations.class`, `Jedis.class`
> <br/> pom 引入
> ```
> <!-- 使用Redis -->
> <dependency>
> <groupId>org.springframework.data</groupId>
> <artifactId>spring-data-redis</artifactId>
> <optional>true</optional>
> </dependency>
> <dependency>
> <groupId>redis.clients</groupId>
> <artifactId>jedis</artifactId>
> <optional>true</optional>
> </dependency>
> ```
>application.properties 配置
><br/> 默认db0k开启 1-15需要使用哪个`yexuejc.redis.dbx=true`
>```
> yexuejc.redis.db1=true
> spring.redis.jedis.pool.max-active=100
> spring.redis.jedis.pool.max-idle=10
> spring.redis.jedis.pool.min-idle=3
> spring.redis.host=地址
> spring.redis.password=密码
> spring.redis.port=端口
>```
#### 阿里 OSS 功能
> 类:[OssAutoConfiguration](../../yexuejc-springboot-base/src/main/java/com/yexuejc/springboot/base/autoconfigure/OssAutoConfiguration.java)
> <br/> 功能开关:`yexuejc.autoconfigure.oss.enable=true`
> <br/> 依赖:`OSSClient`
> <br/> pom 引入
> ```
> <!-- 阿里云OSS相关SDK -->
> <dependency>
> <groupId>com.aliyun.oss</groupId>
> <artifactId>aliyun-sdk-oss</artifactId>
> <optional>true</optional>
> </dependency>
> ```
>application.properties 配置
>```
> yexuejc.alibaba.oss.endpoint=自己去阿里申请的endpoint
> yexuejc.alibaba.oss.access-key-secret=自己到阿里云申请access-key-secret
> yexuejc.alibaba.oss.access-key-id=自己到阿里云申请access-key
> yexuejc.alibaba.oss.bucket=自己去阿里申请的bucket
>```
#### WebMvc 相关配置
> 类:[WebAutoConfiguration](../../yexuejc-springboot-base/src/main/java/com/yexuejc/springboot/base/autoconfigure/WebAutoConfiguration.java)
> <br/> 功能开关:`yexuejc.autoconfigure.webmvc.enable=true`
> 本类开启后的具体使用说明参见[WebMvc相关配置](WebAutoConfiguration.md)

View File

@@ -0,0 +1,2 @@
WebMvc相关配置 [WebAutoConfiguration](../../yexuejc-springboot-base/src/main/java/com/yexuejc/springboot/base/autoconfigure/WebAutoConfiguration.java)
------------------------------------