Browse Source

fix: 修改Redis配置

huangzqa 4 years ago
parent
commit
3f36d727df

+ 1 - 1
dcuc-app-service/src/main/java/com/dragoninfo/dcuc/app/service/impl/ApplyInfoServiceImpl.java

@@ -48,7 +48,7 @@ import java.util.stream.Collectors;
  * @author huangzqa
  * @author huangzqa
  * @date 2020/10/27
  * @date 2020/10/27
  */
  */
-@CacheConfig(cacheNames = "DCUC-APP:app")
+@CacheConfig(cacheNames = "DCUC-APP")
 @Service
 @Service
 public class ApplyInfoServiceImpl extends BaseMybatisService<ApplyInfo, String> implements IApplyInfoService {
 public class ApplyInfoServiceImpl extends BaseMybatisService<ApplyInfo, String> implements IApplyInfoService {
 
 

+ 10 - 10
dcuc-app-service/src/main/resources/application-base.yml

@@ -30,6 +30,16 @@ spring:
     jedis:
     jedis:
       pool:
       pool:
         max-active: 500
         max-active: 500
+  cache:
+    # 缓存类型,默认根据环境自动检测,ehcache、redis、simple、caffeine、jcache、infinispan、Hazeleast、none
+    type: redis
+    # 如果底层缓存管理器支持缓存名的话,可以在这里指定要创建的缓存名列表,用逗号分 隔。通常这会禁用运行时创建其他额外缓存的能力。
+    cache-names: DCUC-APP
+    # 缓存连接超时时间
+    #多cacheManager支持 CacheManager(ex:ehCacheCacheManager,simpleCacheManager,redisCacheManager,caffeineCacheManager)
+    init-cache-managers: redisCacheManager
+    redis-time-live:
+      DCUC-APP: 5000000
   kafka:
   kafka:
     producer:
     producer:
       bootstrap-servers: 192.168.10.20:9093
       bootstrap-servers: 192.168.10.20:9093
@@ -79,16 +89,6 @@ duceap:
     sqlaudit:
     sqlaudit:
       output: kafka
       output: kafka
       exclude-tables: T_LOG_*
       exclude-tables: T_LOG_*
-  cache:
-    # 缓存类型,默认根据环境自动检测,ehcache、redis、simple、caffeine、jcache、infinispan、Hazeleast、none
-    type: redis
-    # 如果底层缓存管理器支持缓存名的话,可以在这里指定要创建的缓存名列表,用逗号分 隔。通常这会禁用运行时创建其他额外缓存的能力。
-    cache-names: DCUC-APP:app
-    # 缓存连接超时时间
-    redis:
-      time-to-live: 5000
-    #多cacheManager支持 CacheManager(ex:ehCacheCacheManager,simpleCacheManager,redisCacheManager,caffeineCacheManager)
-    init-cache-managers: redisCacheManager
   license:
   license:
     enabled: false
     enabled: false
     #配置用来指定license对接的后端项目地址(格式:ip:port/context,如http://10.10.10.10:8080/ctx),
     #配置用来指定license对接的后端项目地址(格式:ip:port/context,如http://10.10.10.10:8080/ctx),