Skip to content

Commit 21f8b4e

Browse files
committed
[代码完善](v2.5): v2.5 beta 事务优化
close elunez#362
1 parent d988606 commit 21f8b4e

22 files changed

Lines changed: 3 additions & 47 deletions

File tree

eladmin-logging/src/main/java/me/zhengjie/service/impl/LogServiceImpl.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import org.springframework.data.domain.Page;
3232
import org.springframework.data.domain.Pageable;
3333
import org.springframework.stereotype.Service;
34-
import org.springframework.transaction.annotation.Propagation;
3534
import org.springframework.transaction.annotation.Transactional;
3635
import javax.servlet.http.HttpServletResponse;
3736
import java.io.IOException;
@@ -44,7 +43,6 @@
4443
*/
4544
@Service
4645
@RequiredArgsConstructor
47-
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
4846
public class LogServiceImpl implements LogService {
4947

5048
private final LogRepository logRepository;

eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/AppServiceImpl.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import org.springframework.data.domain.Page;
3131
import org.springframework.data.domain.Pageable;
3232
import org.springframework.stereotype.Service;
33-
import org.springframework.transaction.annotation.Propagation;
3433
import org.springframework.transaction.annotation.Transactional;
3534
import javax.servlet.http.HttpServletResponse;
3635
import java.io.IOException;
@@ -42,7 +41,6 @@
4241
*/
4342
@Service
4443
@RequiredArgsConstructor
45-
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
4644
public class AppServiceImpl implements AppService {
4745

4846
private final AppRepository appRepository;

eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DatabaseServiceImpl.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import org.springframework.data.domain.Page;
3333
import org.springframework.data.domain.Pageable;
3434
import org.springframework.stereotype.Service;
35-
import org.springframework.transaction.annotation.Propagation;
3635
import org.springframework.transaction.annotation.Transactional;
3736
import javax.servlet.http.HttpServletResponse;
3837
import java.io.IOException;
@@ -45,7 +44,6 @@
4544
@Slf4j
4645
@Service
4746
@RequiredArgsConstructor
48-
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
4947
public class DatabaseServiceImpl implements DatabaseService {
5048

5149
private final DatabaseRepository databaseRepository;

eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployHistoryServiceImpl.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import org.springframework.data.domain.Page;
3131
import org.springframework.data.domain.Pageable;
3232
import org.springframework.stereotype.Service;
33-
import org.springframework.transaction.annotation.Propagation;
3433
import org.springframework.transaction.annotation.Transactional;
3534
import javax.servlet.http.HttpServletResponse;
3635
import java.io.IOException;
@@ -42,7 +41,6 @@
4241
*/
4342
@Service
4443
@RequiredArgsConstructor
45-
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
4644
public class DeployHistoryServiceImpl implements DeployHistoryService {
4745

4846
private final DeployHistoryRepository deployhistoryRepository;

eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployServiceImpl.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@
4242
import org.springframework.data.domain.Page;
4343
import org.springframework.data.domain.Pageable;
4444
import org.springframework.stereotype.Service;
45-
import org.springframework.transaction.annotation.Propagation;
4645
import org.springframework.transaction.annotation.Transactional;
47-
4846
import javax.servlet.http.HttpServletResponse;
4947
import java.io.IOException;
5048
import java.util.*;
@@ -56,7 +54,6 @@
5654
@Slf4j
5755
@Service
5856
@RequiredArgsConstructor
59-
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
6057
public class DeployServiceImpl implements DeployService {
6158

6259
private final String FILE_SEPARATOR = "/";

eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/ServerDeployServiceImpl.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import org.springframework.data.domain.Page;
3131
import org.springframework.data.domain.Pageable;
3232
import org.springframework.stereotype.Service;
33-
import org.springframework.transaction.annotation.Propagation;
3433
import org.springframework.transaction.annotation.Transactional;
3534
import javax.servlet.http.HttpServletResponse;
3635
import java.io.IOException;
@@ -42,7 +41,6 @@
4241
*/
4342
@Service
4443
@RequiredArgsConstructor
45-
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
4644
public class ServerDeployServiceImpl implements ServerDeployService {
4745

4846
private final ServerDeployRepository serverDeployRepository;

eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/impl/QuartzJobServiceImpl.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import org.quartz.CronExpression;
3232
import org.springframework.data.domain.Pageable;
3333
import org.springframework.stereotype.Service;
34-
import org.springframework.transaction.annotation.Propagation;
3534
import org.springframework.transaction.annotation.Transactional;
3635
import javax.servlet.http.HttpServletResponse;
3736
import java.io.IOException;
@@ -43,7 +42,6 @@
4342
*/
4443
@RequiredArgsConstructor
4544
@Service(value = "quartzJobService")
46-
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
4745
public class QuartzJobServiceImpl implements QuartzJobService {
4846

4947
private final QuartzJobRepository quartzJobRepository;

eladmin-system/src/main/java/me/zhengjie/modules/security/service/UserDetailsServiceImpl.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,13 @@
2626
import org.springframework.security.core.userdetails.UserDetailsService;
2727
import org.springframework.security.core.userdetails.UsernameNotFoundException;
2828
import org.springframework.stereotype.Service;
29-
import org.springframework.transaction.annotation.Propagation;
30-
import org.springframework.transaction.annotation.Transactional;
3129

3230
/**
3331
* @author Zheng Jie
3432
* @date 2018-11-22
3533
*/
3634
@RequiredArgsConstructor
3735
@Service("userDetailsService")
38-
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
3936
public class UserDetailsServiceImpl implements UserDetailsService {
4037

4138
private final UserService userService;

eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DeptServiceImpl.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
import org.springframework.cache.annotation.Cacheable;
3737
import org.springframework.data.domain.Sort;
3838
import org.springframework.stereotype.Service;
39-
import org.springframework.transaction.annotation.Propagation;
4039
import org.springframework.transaction.annotation.Transactional;
4140
import javax.servlet.http.HttpServletResponse;
4241
import java.io.IOException;
@@ -51,7 +50,6 @@
5150
@Service
5251
@RequiredArgsConstructor
5352
@CacheConfig(cacheNames = "dept")
54-
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
5553
public class DeptServiceImpl implements DeptService {
5654

5755
private final DeptRepository deptRepository;

eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DictDetailServiceImpl.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import org.springframework.data.domain.Page;
3434
import org.springframework.data.domain.Pageable;
3535
import org.springframework.stereotype.Service;
36-
import org.springframework.transaction.annotation.Propagation;
3736
import org.springframework.transaction.annotation.Transactional;
3837
import java.util.List;
3938
import java.util.Map;
@@ -45,7 +44,6 @@
4544
@Service
4645
@RequiredArgsConstructor
4746
@CacheConfig(cacheNames = "dict")
48-
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
4947
public class DictDetailServiceImpl implements DictDetailService {
5048

5149
private final DictRepository dictRepository;

0 commit comments

Comments
 (0)