From 21f8b4ebb50c530eb7cabe705e8805ae3232b64a Mon Sep 17 00:00:00 2001 From: ZhengJie <201507802@qq.com> Date: Sun, 24 May 2020 10:59:45 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BB=A3=E7=A0=81=E5=AE=8C=E5=96=84](v2.5):?= =?UTF-8?q?=20v2.5=20beta=20=E4=BA=8B=E5=8A=A1=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit close #362 --- .../src/main/java/me/zhengjie/service/impl/LogServiceImpl.java | 2 -- .../me/zhengjie/modules/mnt/service/impl/AppServiceImpl.java | 2 -- .../zhengjie/modules/mnt/service/impl/DatabaseServiceImpl.java | 2 -- .../modules/mnt/service/impl/DeployHistoryServiceImpl.java | 2 -- .../zhengjie/modules/mnt/service/impl/DeployServiceImpl.java | 3 --- .../modules/mnt/service/impl/ServerDeployServiceImpl.java | 2 -- .../modules/quartz/service/impl/QuartzJobServiceImpl.java | 2 -- .../modules/security/service/UserDetailsServiceImpl.java | 3 --- .../zhengjie/modules/system/service/impl/DeptServiceImpl.java | 2 -- .../modules/system/service/impl/DictDetailServiceImpl.java | 2 -- .../zhengjie/modules/system/service/impl/DictServiceImpl.java | 3 --- .../zhengjie/modules/system/service/impl/JobServiceImpl.java | 2 -- .../zhengjie/modules/system/service/impl/MenuServiceImpl.java | 2 -- .../zhengjie/modules/system/service/impl/RoleServiceImpl.java | 3 +-- .../zhengjie/modules/system/service/impl/UserServiceImpl.java | 3 +-- .../modules/system/service/impl/VerifyServiceImpl.java | 2 -- .../main/resources/template/generator/admin/ServiceImpl.ftl | 3 +-- .../main/java/me/zhengjie/service/impl/AliPayServiceImpl.java | 2 -- .../main/java/me/zhengjie/service/impl/EmailServiceImpl.java | 2 -- .../java/me/zhengjie/service/impl/LocalStorageServiceImpl.java | 2 -- .../main/java/me/zhengjie/service/impl/PictureServiceImpl.java | 2 -- .../main/java/me/zhengjie/service/impl/QiNiuServiceImpl.java | 2 -- 22 files changed, 3 insertions(+), 47 deletions(-) diff --git a/eladmin-logging/src/main/java/me/zhengjie/service/impl/LogServiceImpl.java b/eladmin-logging/src/main/java/me/zhengjie/service/impl/LogServiceImpl.java index bac759c1..45428d42 100644 --- a/eladmin-logging/src/main/java/me/zhengjie/service/impl/LogServiceImpl.java +++ b/eladmin-logging/src/main/java/me/zhengjie/service/impl/LogServiceImpl.java @@ -31,7 +31,6 @@ import org.aspectj.lang.reflect.MethodSignature; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -44,7 +43,6 @@ import java.util.*; */ @Service @RequiredArgsConstructor -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class LogServiceImpl implements LogService { private final LogRepository logRepository; diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/AppServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/AppServiceImpl.java index 0e3b6ad9..42b088ff 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/AppServiceImpl.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/AppServiceImpl.java @@ -30,7 +30,6 @@ import me.zhengjie.utils.ValidationUtil; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -42,7 +41,6 @@ import java.util.*; */ @Service @RequiredArgsConstructor -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class AppServiceImpl implements AppService { private final AppRepository appRepository; diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DatabaseServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DatabaseServiceImpl.java index 28235a16..c7740285 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DatabaseServiceImpl.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DatabaseServiceImpl.java @@ -32,7 +32,6 @@ import me.zhengjie.utils.ValidationUtil; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -45,7 +44,6 @@ import java.util.*; @Slf4j @Service @RequiredArgsConstructor -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class DatabaseServiceImpl implements DatabaseService { private final DatabaseRepository databaseRepository; diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployHistoryServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployHistoryServiceImpl.java index d716caa6..7431113d 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployHistoryServiceImpl.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployHistoryServiceImpl.java @@ -30,7 +30,6 @@ import me.zhengjie.utils.ValidationUtil; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -42,7 +41,6 @@ import java.util.*; */ @Service @RequiredArgsConstructor -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class DeployHistoryServiceImpl implements DeployHistoryService { private final DeployHistoryRepository deployhistoryRepository; diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployServiceImpl.java index a44100f0..3884fe4e 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployServiceImpl.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployServiceImpl.java @@ -42,9 +42,7 @@ import me.zhengjie.utils.*; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; - import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.*; @@ -56,7 +54,6 @@ import java.util.*; @Slf4j @Service @RequiredArgsConstructor -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class DeployServiceImpl implements DeployService { private final String FILE_SEPARATOR = "/"; diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/ServerDeployServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/ServerDeployServiceImpl.java index 0034b247..63272dae 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/ServerDeployServiceImpl.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/ServerDeployServiceImpl.java @@ -30,7 +30,6 @@ import me.zhengjie.utils.ValidationUtil; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -42,7 +41,6 @@ import java.util.*; */ @Service @RequiredArgsConstructor -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class ServerDeployServiceImpl implements ServerDeployService { private final ServerDeployRepository serverDeployRepository; diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/impl/QuartzJobServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/impl/QuartzJobServiceImpl.java index 0f703cf1..a7b3965d 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/impl/QuartzJobServiceImpl.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/impl/QuartzJobServiceImpl.java @@ -31,7 +31,6 @@ import me.zhengjie.utils.ValidationUtil; import org.quartz.CronExpression; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -43,7 +42,6 @@ import java.util.*; */ @RequiredArgsConstructor @Service(value = "quartzJobService") -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class QuartzJobServiceImpl implements QuartzJobService { private final QuartzJobRepository quartzJobRepository; diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/security/service/UserDetailsServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/security/service/UserDetailsServiceImpl.java index 9aaf753e..71f263e1 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/security/service/UserDetailsServiceImpl.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/security/service/UserDetailsServiceImpl.java @@ -26,8 +26,6 @@ import me.zhengjie.modules.system.service.dto.UserDto; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; -import org.springframework.transaction.annotation.Transactional; /** * @author Zheng Jie @@ -35,7 +33,6 @@ import org.springframework.transaction.annotation.Transactional; */ @RequiredArgsConstructor @Service("userDetailsService") -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class UserDetailsServiceImpl implements UserDetailsService { private final UserService userService; diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DeptServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DeptServiceImpl.java index 7a335dc3..f572d889 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DeptServiceImpl.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DeptServiceImpl.java @@ -36,7 +36,6 @@ import org.springframework.cache.annotation.CacheConfig; import org.springframework.cache.annotation.Cacheable; import org.springframework.data.domain.Sort; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -51,7 +50,6 @@ import java.util.stream.Collectors; @Service @RequiredArgsConstructor @CacheConfig(cacheNames = "dept") -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class DeptServiceImpl implements DeptService { private final DeptRepository deptRepository; diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DictDetailServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DictDetailServiceImpl.java index 2a4cf33d..1f8f974e 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DictDetailServiceImpl.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DictDetailServiceImpl.java @@ -33,7 +33,6 @@ import org.springframework.cache.annotation.Cacheable; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import java.util.List; import java.util.Map; @@ -45,7 +44,6 @@ import java.util.Map; @Service @RequiredArgsConstructor @CacheConfig(cacheNames = "dict") -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class DictDetailServiceImpl implements DictDetailService { private final DictRepository dictRepository; diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DictServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DictServiceImpl.java index 64fc3ab8..3c041ddd 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DictServiceImpl.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DictServiceImpl.java @@ -26,11 +26,9 @@ import me.zhengjie.modules.system.service.DictService; import me.zhengjie.modules.system.service.dto.DictDto; import me.zhengjie.modules.system.service.mapstruct.DictMapper; import org.springframework.cache.annotation.CacheConfig; -import org.springframework.cache.annotation.Cacheable; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -43,7 +41,6 @@ import java.util.*; @Service @RequiredArgsConstructor @CacheConfig(cacheNames = "dict") -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class DictServiceImpl implements DictService { private final DictRepository dictRepository; diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/JobServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/JobServiceImpl.java index 8c0e3700..b881b422 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/JobServiceImpl.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/JobServiceImpl.java @@ -32,7 +32,6 @@ import org.springframework.cache.annotation.Cacheable; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -45,7 +44,6 @@ import java.util.*; @Service @RequiredArgsConstructor @CacheConfig(cacheNames = "job") -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class JobServiceImpl implements JobService { private final JobRepository jobRepository; diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MenuServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MenuServiceImpl.java index 13a941a3..33642f7d 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MenuServiceImpl.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MenuServiceImpl.java @@ -37,7 +37,6 @@ import org.springframework.cache.annotation.CacheConfig; import org.springframework.cache.annotation.Cacheable; import org.springframework.data.domain.Sort; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -51,7 +50,6 @@ import java.util.stream.Collectors; @Service @RequiredArgsConstructor @CacheConfig(cacheNames = "menu") -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class MenuServiceImpl implements MenuService { private final MenuRepository menuRepository; diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/RoleServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/RoleServiceImpl.java index 73254309..db918daa 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/RoleServiceImpl.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/RoleServiceImpl.java @@ -39,7 +39,6 @@ import org.springframework.data.domain.Sort; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -53,7 +52,6 @@ import java.util.stream.Collectors; @Service @RequiredArgsConstructor @CacheConfig(cacheNames = "role") -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class RoleServiceImpl implements RoleService { private final RoleRepository roleRepository; @@ -80,6 +78,7 @@ public class RoleServiceImpl implements RoleService { } @Override + @Transactional @Cacheable(key = "'id:' + #p0") public RoleDto findById(long id) { Role role = roleRepository.findById(id).orElseGet(Role::new); diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/UserServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/UserServiceImpl.java index 206da00c..be4a5d39 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/UserServiceImpl.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/UserServiceImpl.java @@ -33,7 +33,6 @@ import org.springframework.cache.annotation.Cacheable; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; @@ -49,7 +48,6 @@ import java.util.stream.Collectors; @Service @RequiredArgsConstructor @CacheConfig(cacheNames = "user") -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class UserServiceImpl implements UserService { private final UserRepository userRepository; @@ -70,6 +68,7 @@ public class UserServiceImpl implements UserService { } @Override + @Transactional @Cacheable(key = "'id:' + #p0") public UserDto findById(long id) { User user = userRepository.findById(id).orElseGet(User::new); diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/VerifyServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/VerifyServiceImpl.java index 6939e86b..ec3230c7 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/VerifyServiceImpl.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/VerifyServiceImpl.java @@ -28,7 +28,6 @@ import me.zhengjie.modules.system.service.VerifyService; import me.zhengjie.utils.RedisUtils; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import java.util.Collections; @@ -38,7 +37,6 @@ import java.util.Collections; */ @Service @RequiredArgsConstructor -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class VerifyServiceImpl implements VerifyService { @Value("${code.expiration}") diff --git a/eladmin-system/src/main/resources/template/generator/admin/ServiceImpl.ftl b/eladmin-system/src/main/resources/template/generator/admin/ServiceImpl.ftl index f45a4bca..4a75aeae 100644 --- a/eladmin-system/src/main/resources/template/generator/admin/ServiceImpl.ftl +++ b/eladmin-system/src/main/resources/template/generator/admin/ServiceImpl.ftl @@ -34,7 +34,6 @@ import ${package}.service.dto.${className}Dto; import ${package}.service.dto.${className}QueryCriteria; import ${package}.service.mapstruct.${className}Mapper; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; <#if !auto && pkColumnType = 'Long'> import cn.hutool.core.lang.Snowflake; @@ -62,7 +61,6 @@ import java.util.LinkedHashMap; **/ @Service @RequiredArgsConstructor -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class ${className}ServiceImpl implements ${className}Service { private final ${className}Repository ${changeClassName}Repository; @@ -80,6 +78,7 @@ public class ${className}ServiceImpl implements ${className}Service { } @Override + @Transactional public ${className}Dto findById(${pkColumnType} ${pkChangeColName}) { ${className} ${changeClassName} = ${changeClassName}Repository.findById(${pkChangeColName}).orElseGet(${className}::new); ValidationUtil.isNull(${changeClassName}.get${pkCapitalColName}(),"${className}","${pkChangeColName}",${pkChangeColName}); diff --git a/eladmin-tools/src/main/java/me/zhengjie/service/impl/AliPayServiceImpl.java b/eladmin-tools/src/main/java/me/zhengjie/service/impl/AliPayServiceImpl.java index 5cbe3873..5271c4fa 100644 --- a/eladmin-tools/src/main/java/me/zhengjie/service/impl/AliPayServiceImpl.java +++ b/eladmin-tools/src/main/java/me/zhengjie/service/impl/AliPayServiceImpl.java @@ -29,7 +29,6 @@ import org.springframework.cache.annotation.CacheConfig; 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.Optional; @@ -40,7 +39,6 @@ import java.util.Optional; @Service @RequiredArgsConstructor @CacheConfig(cacheNames = "alipay") -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class AliPayServiceImpl implements AliPayService { private final AliPayRepository alipayRepository; diff --git a/eladmin-tools/src/main/java/me/zhengjie/service/impl/EmailServiceImpl.java b/eladmin-tools/src/main/java/me/zhengjie/service/impl/EmailServiceImpl.java index f9ea59cb..c6f28f2d 100644 --- a/eladmin-tools/src/main/java/me/zhengjie/service/impl/EmailServiceImpl.java +++ b/eladmin-tools/src/main/java/me/zhengjie/service/impl/EmailServiceImpl.java @@ -28,7 +28,6 @@ import org.springframework.cache.annotation.CacheConfig; 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.Optional; @@ -39,7 +38,6 @@ import java.util.Optional; @Service @RequiredArgsConstructor @CacheConfig(cacheNames = "email") -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class EmailServiceImpl implements EmailService { private final EmailRepository emailRepository; diff --git a/eladmin-tools/src/main/java/me/zhengjie/service/impl/LocalStorageServiceImpl.java b/eladmin-tools/src/main/java/me/zhengjie/service/impl/LocalStorageServiceImpl.java index b7c23b7e..50250825 100644 --- a/eladmin-tools/src/main/java/me/zhengjie/service/impl/LocalStorageServiceImpl.java +++ b/eladmin-tools/src/main/java/me/zhengjie/service/impl/LocalStorageServiceImpl.java @@ -27,7 +27,6 @@ import me.zhengjie.utils.*; import me.zhengjie.repository.LocalStorageRepository; import me.zhengjie.service.LocalStorageService; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import java.io.File; import java.io.IOException; @@ -46,7 +45,6 @@ import javax.servlet.http.HttpServletResponse; */ @Service @RequiredArgsConstructor -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class LocalStorageServiceImpl implements LocalStorageService { private final LocalStorageRepository localStorageRepository; diff --git a/eladmin-tools/src/main/java/me/zhengjie/service/impl/PictureServiceImpl.java b/eladmin-tools/src/main/java/me/zhengjie/service/impl/PictureServiceImpl.java index c36040d0..112e90d9 100644 --- a/eladmin-tools/src/main/java/me/zhengjie/service/impl/PictureServiceImpl.java +++ b/eladmin-tools/src/main/java/me/zhengjie/service/impl/PictureServiceImpl.java @@ -31,7 +31,6 @@ import me.zhengjie.utils.*; import org.springframework.beans.factory.annotation.Value; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; @@ -46,7 +45,6 @@ import java.util.*; @Slf4j @RequiredArgsConstructor @Service(value = "pictureService") -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class PictureServiceImpl implements PictureService { @Value("${smms.token}") diff --git a/eladmin-tools/src/main/java/me/zhengjie/service/impl/QiNiuServiceImpl.java b/eladmin-tools/src/main/java/me/zhengjie/service/impl/QiNiuServiceImpl.java index 6beb8ad6..0db2d7af 100644 --- a/eladmin-tools/src/main/java/me/zhengjie/service/impl/QiNiuServiceImpl.java +++ b/eladmin-tools/src/main/java/me/zhengjie/service/impl/QiNiuServiceImpl.java @@ -43,7 +43,6 @@ import org.springframework.cache.annotation.CachePut; import org.springframework.cache.annotation.Cacheable; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; @@ -57,7 +56,6 @@ import java.util.*; @Service @RequiredArgsConstructor @CacheConfig(cacheNames = "qiNiu") -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class QiNiuServiceImpl implements QiNiuService { private final QiNiuConfigRepository qiNiuConfigRepository;