cashable完善
diff --git a/src/main/java/com/supwisdom/dlpay/system/domain/TDictionaryId.java b/src/main/java/com/supwisdom/dlpay/system/domain/TDictionaryId.java
index a05882d..f043e86 100644
--- a/src/main/java/com/supwisdom/dlpay/system/domain/TDictionaryId.java
+++ b/src/main/java/com/supwisdom/dlpay/system/domain/TDictionaryId.java
@@ -8,6 +8,7 @@
*/
@Embeddable
public class TDictionaryId implements java.io.Serializable {
+ private static final long serialVersionUID = -3634796933248319363L;
// Fields
diff --git a/src/main/java/com/supwisdom/dlpay/system/service/impl/SystemServiceImpl.java b/src/main/java/com/supwisdom/dlpay/system/service/impl/SystemServiceImpl.java
index 310445b..a5e6493 100644
--- a/src/main/java/com/supwisdom/dlpay/system/service/impl/SystemServiceImpl.java
+++ b/src/main/java/com/supwisdom/dlpay/system/service/impl/SystemServiceImpl.java
@@ -30,13 +30,13 @@
private BuildingDao buildingDao;
@Override
- @CacheEvict(cacheNames = "dictionary_cache", key = "'.*'", allEntries = true)
+ @CacheEvict(cacheNames = "door_dictionary_cache", key = "'.*'", allEntries = true)
public void refreshCache() {
}
@Override
- @CacheEvict(cacheNames = "opertypes_cache", key = "'.*'", allEntries = true)
+ @CacheEvict(cacheNames = "door_opertypes_cache", key = "'.*'", allEntries = true)
public void refreshOpertypesCashe() {
}
@@ -52,7 +52,7 @@
}
@Override
- @CacheEvict(cacheNames = "dicationary_cache", key = "#p0")
+ @CacheEvict(cacheNames = "door_dicationary_cache", key = "#p0")
public boolean saveDictionary(String dicttype, String dicttypename, String dictval, String dictcaption) {
TDictionary tDictionary = new TDictionary();
TDictionaryId tDictionaryId = new TDictionaryId();
@@ -66,13 +66,13 @@
}
@Override
- @Cacheable(cacheNames = "dicationary_cache", key = "#p0")
+ @Cacheable(cacheNames = "door_dicationary_cache", key = "#p0")
public List<TDictionaryId> findTDictionaryByType(int type) {
return dictionaryDao.findTDictionaryByType(type);
}
@Override
- @Cacheable(cacheNames = "opertypes_cache", key = "#p0")
+ @Cacheable(cacheNames = "door_opertypes_cache", key = "#p0")
public List<TDictionaryId> findOpertypes(String opertype) {
return dictionaryDao.findOpertypes(opertype);
}
@@ -83,7 +83,7 @@
}
@Override
- @CacheEvict(cacheNames = "dicationary_cache", key = "#p0")
+ @CacheEvict(cacheNames = "door_dicationary_cache", key = "#p0")
public TDictionary updateDictionary(String dicttype, String dicttypename, String dictval, String dictcaption, String oriengaltype, String oriengalval) {
return dictionaryDao.updateDictionary(dicttype, dicttypename, dictval, dictcaption, oriengaltype, oriengalval);
}
diff --git a/src/main/kotlin/com/supwisdom/dlpay/DoorApplication.kt b/src/main/kotlin/com/supwisdom/dlpay/DoorApplication.kt
index 11956f3..be5b416 100644
--- a/src/main/kotlin/com/supwisdom/dlpay/DoorApplication.kt
+++ b/src/main/kotlin/com/supwisdom/dlpay/DoorApplication.kt
@@ -5,6 +5,7 @@
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication
import org.springframework.boot.web.servlet.ServletComponentScan
+import org.springframework.cache.annotation.EnableCaching
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.data.redis.connection.RedisConnectionFactory
@@ -68,6 +69,7 @@
@SpringBootApplication
@EnableScheduling
+@EnableCaching
@ServletComponentScan
class DoorApplication