spring-boot-starters/wx-java-mp-spring-boot-starter/pom.xmlVoir le fichier
@@ -28,6 +28,7 @@
<groupId>org.redisson</groupId>
<artifactId>redisson</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
+ 26- 17
spring-boot-starters/wx-java-mp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/mp/config/WxMpStorageAutoConfiguration.javaVoir le fichier
return new JedisPool(config, redis.getHost(), redis.getPort(), redis.getTimeout(), redis.getPassword(),
redis.getDatabase());
}
private <T> T getBean(Class<T> clazz) {
if (this.applicationContext.getBeanNamesForType(clazz, false, false).length > 0) {
return this.applicationContext.getBean(clazz);
}
return null;
}
}
+ 21- 0
spring-boot-starters/wx-java-mp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/mp/properties/RedisProperties.javaVoir le fichier
@@ -13,6 +13,16 @@ import java.io.Serializable;
public class RedisProperties implements Serializable {
private static final long serialVersionUID = -5924815351660074401L;
/**
* 操作Redis的实现
*/
private ImplType impl = ImplType.jedis;
/**
* 操作Redis的实现如果在spring容器里是否直接使用
*/
private boolean reuseBean = true;
/**
* 主机地址.
*/
@@ -42,4 +52,15 @@ public class RedisProperties implements Serializable {