parent
47c91bb061
commit
8fabbe8539
|
@ -1,32 +1,34 @@
|
|||
package com.hzya.frame.mdm.mdmModule.config;
|
||||
|
||||
import org.springframework.cache.Cache;
|
||||
import org.springframework.cache.CacheManager;
|
||||
import org.springframework.cache.annotation.CachingConfigurerSupport;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.cache.concurrent.ConcurrentMapCache;
|
||||
import org.springframework.cache.support.SimpleCacheManager;
|
||||
import org.springframework.cache.concurrent.ConcurrentMapCacheManager;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Configuration
|
||||
@EnableCaching
|
||||
public class CacheConfig extends CachingConfigurerSupport {
|
||||
|
||||
@Override
|
||||
@Bean
|
||||
public CacheManager cacheManager() {
|
||||
SimpleCacheManager cacheManager = new SimpleCacheManager();
|
||||
|
||||
// 添加所有需要的缓存(包括缺失的mdmModuleDb)
|
||||
List<Cache> caches = new ArrayList<>();
|
||||
caches.add(new ConcurrentMapCache("mdmModuleDb"));
|
||||
caches.add(new ConcurrentMapCache("mdmModuleDbFileds"));
|
||||
caches.add(new ConcurrentMapCache("mdmModule"));
|
||||
|
||||
cacheManager.setCaches(caches);
|
||||
public ConcurrentMapCacheManager cacheManager() {
|
||||
// 整合所有需要的缓存名称:原有的mdm相关缓存 + 新的业务缓存
|
||||
List<String> cacheNames = Arrays.asList(
|
||||
// 原有缓存(来自SimpleCacheManager的配置)
|
||||
"mdmModuleDb",
|
||||
"mdmModuleDbFileds",
|
||||
"mdmModule",
|
||||
// 新添加的业务缓存(来自之前的ConcurrentMapCacheManager配置)
|
||||
"sysApplicationPlugin",
|
||||
"IntegrationTask",
|
||||
"IntegrationTaskLiving"
|
||||
);
|
||||
ConcurrentMapCacheManager cacheManager = new ConcurrentMapCacheManager();
|
||||
cacheManager.setCacheNames(cacheNames); // 注册所有缓存名称
|
||||
return cacheManager;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,11 +73,11 @@
|
|||
</sql>
|
||||
|
||||
<!--通过ID获取数据 -->
|
||||
<select id="entity_get" resultMap="get-IntegrationTaskLivingDetailsEntity-result">
|
||||
select
|
||||
<include refid="IntegrationTaskLivingDetailsEntity_Base_Column_List" />
|
||||
from integration_task_living_details where id = #{ id } and sts='Y'
|
||||
</select>
|
||||
<!-- <select id="entity_get" resultMap="get-IntegrationTaskLivingDetailsEntity-result">-->
|
||||
<!-- select-->
|
||||
<!-- <include refid="IntegrationTaskLivingDetailsEntity_Base_Column_List" />-->
|
||||
<!-- from integration_task_living_details where id = #{ id } and sts='Y'-->
|
||||
<!-- </select>-->
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base" resultMap="get-IntegrationTaskLivingDetailsEntity-result" parameterType = "com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity">
|
||||
|
|
5
pom.xml
5
pom.xml
|
@ -44,8 +44,9 @@
|
|||
<druid.version>1.1.22</druid.version>
|
||||
<!-- <mybatis-spring-boot-starter.version>2.2.2</mybatis-spring-boot-starter.version>-->
|
||||
<mybatis-plus-boot-starter.version>3.5.6</mybatis-plus-boot-starter.version>
|
||||
<!-- <mysql-connector-j.version>8.0.33</mysql-connector-j.version>-->
|
||||
<mysql-connector-java>5.1.49</mysql-connector-java>
|
||||
<!-- <mysql-connector-j.version>8.0.13</mysql-connector-j.version>-->
|
||||
<!-- <mysql-connector-java>5.1.49</mysql-connector-java>-->
|
||||
<mysql-connector-java>8.0.33</mysql-connector-java>
|
||||
<pagehelper-spring-boot-starter.version>1.4.6</pagehelper-spring-boot-starter.version>
|
||||
<spring-boot-starter-cache.version>2.7.18</spring-boot-starter-cache.version>
|
||||
<sa.token.version>1.30.0</sa.token.version>
|
||||
|
|
Loading…
Reference in New Issue