Browse Source

配置信息更新时不开启事务

fgd 7 months ago
parent
commit
bb769a6a9d

+ 3 - 0
ruoyi-system/src/main/java/org/dromara/system/service/impl/SysConfigServiceImpl.java

@@ -27,6 +27,8 @@ import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.cache.annotation.CachePut;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.Arrays;
 import java.util.List;
@@ -203,6 +205,7 @@ public class SysConfigServiceImpl implements ISysConfigService, ConfigService {
         return true;
     }
 
+    @Transactional(propagation = Propagation.NOT_SUPPORTED)
     @CacheEvict(cacheNames = CacheNames.SYS_CONFIG, key = "#configKey")
     @Override
     public void updateConfigByKey(String configKey, String configValue) {