refactor: 使用final修饰符取代 @NonNull注解 进行bean注入
This commit is contained in:
parent
4e0c6b80b7
commit
b920a748ed
@ -41,17 +41,13 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RequiredArgsConstructor
|
||||
public class LoginController {
|
||||
|
||||
@NonNull
|
||||
private LoginService loginService;
|
||||
private final LoginService loginService;
|
||||
|
||||
@NonNull
|
||||
private MenuApplicationService menuApplicationService;
|
||||
private final MenuApplicationService menuApplicationService;
|
||||
|
||||
@NonNull
|
||||
private UserApplicationService userApplicationService;
|
||||
private final UserApplicationService userApplicationService;
|
||||
|
||||
@NonNull
|
||||
private AgileBootConfig agileBootConfig;
|
||||
private final AgileBootConfig agileBootConfig;
|
||||
|
||||
/**
|
||||
* 访问首页,提示语
|
||||
|
||||
@ -33,8 +33,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RequiredArgsConstructor
|
||||
public class MonitorController extends BaseController {
|
||||
|
||||
@NonNull
|
||||
private MonitorApplicationService monitorApplicationService;
|
||||
private final MonitorApplicationService monitorApplicationService;
|
||||
|
||||
@Operation(summary = "Redis信息")
|
||||
@PreAuthorize("@permission.has('monitor:cache:list')")
|
||||
|
||||
@ -37,8 +37,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Tag(name = "配置API", description = "配置相关的增删查改")
|
||||
public class SysConfigController extends BaseController {
|
||||
|
||||
@NonNull
|
||||
private ConfigApplicationService configApplicationService;
|
||||
private final ConfigApplicationService configApplicationService;
|
||||
|
||||
/**
|
||||
* 获取参数配置列表
|
||||
|
||||
@ -39,8 +39,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Tag(name = "部门API", description = "部门相关的增删查改")
|
||||
public class SysDeptController extends BaseController {
|
||||
|
||||
@NonNull
|
||||
private DeptApplicationService deptApplicationService;
|
||||
private final DeptApplicationService deptApplicationService;
|
||||
|
||||
/**
|
||||
* 获取部门列表
|
||||
|
||||
@ -43,8 +43,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RequiredArgsConstructor
|
||||
public class SysMenuController extends BaseController {
|
||||
|
||||
@NonNull
|
||||
MenuApplicationService menuApplicationService;
|
||||
private final MenuApplicationService menuApplicationService;
|
||||
|
||||
/**
|
||||
* 获取菜单列表
|
||||
|
||||
@ -45,8 +45,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RequiredArgsConstructor
|
||||
public class SysNoticeController extends BaseController {
|
||||
|
||||
@NonNull
|
||||
private NoticeApplicationService noticeApplicationService;
|
||||
private final NoticeApplicationService noticeApplicationService;
|
||||
|
||||
/**
|
||||
* 获取通知公告列表
|
||||
|
||||
@ -41,8 +41,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RequiredArgsConstructor
|
||||
public class SysPostController extends BaseController {
|
||||
|
||||
@NonNull
|
||||
private PostApplicationService postApplicationService;
|
||||
private final PostApplicationService postApplicationService;
|
||||
|
||||
/**
|
||||
* 获取岗位列表
|
||||
|
||||
@ -40,8 +40,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
@RequiredArgsConstructor
|
||||
public class SysProfileController extends BaseController {
|
||||
|
||||
@NonNull
|
||||
private UserApplicationService userApplicationService;
|
||||
private final UserApplicationService userApplicationService;
|
||||
|
||||
/**
|
||||
* 个人信息
|
||||
|
||||
@ -46,8 +46,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RequiredArgsConstructor
|
||||
public class SysRoleController extends BaseController {
|
||||
|
||||
@NonNull
|
||||
private RoleApplicationService roleApplicationService;
|
||||
private final RoleApplicationService roleApplicationService;
|
||||
|
||||
@Operation(summary = "角色列表")
|
||||
@PreAuthorize("@permission.has('system:role:list')")
|
||||
|
||||
@ -47,8 +47,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
@RequiredArgsConstructor
|
||||
public class SysUserController extends BaseController {
|
||||
|
||||
@NonNull
|
||||
private UserApplicationService userApplicationService;
|
||||
private final UserApplicationService userApplicationService;
|
||||
|
||||
/**
|
||||
* 获取用户列表
|
||||
|
||||
@ -27,8 +27,7 @@ import org.springframework.web.filter.OncePerRequestFilter;
|
||||
@RequiredArgsConstructor
|
||||
public class JwtAuthenticationTokenFilter extends OncePerRequestFilter {
|
||||
|
||||
@NonNull
|
||||
private TokenService tokenService;
|
||||
private final TokenService tokenService;
|
||||
|
||||
@Override
|
||||
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
|
||||
|
||||
@ -47,26 +47,21 @@ import org.springframework.web.filter.CorsFilter;
|
||||
@RequiredArgsConstructor
|
||||
public class SecurityConfig {
|
||||
|
||||
@NonNull
|
||||
private TokenService tokenService;
|
||||
private final TokenService tokenService;
|
||||
|
||||
@NonNull
|
||||
private RedisCacheService redisCache;
|
||||
private final RedisCacheService redisCache;
|
||||
|
||||
/**
|
||||
* token认证过滤器
|
||||
*/
|
||||
@NonNull
|
||||
private JwtAuthenticationTokenFilter jwtTokenFilter;
|
||||
private final JwtAuthenticationTokenFilter jwtTokenFilter;
|
||||
|
||||
@NonNull
|
||||
private UserDetailsService userDetailsService;
|
||||
private final UserDetailsService userDetailsService;
|
||||
|
||||
/**
|
||||
* 跨域过滤器
|
||||
*/
|
||||
@NonNull
|
||||
private CorsFilter corsFilter;
|
||||
private final CorsFilter corsFilter;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -54,17 +54,13 @@ import org.springframework.util.FastByteArrayOutputStream;
|
||||
@RequiredArgsConstructor
|
||||
public class LoginService {
|
||||
|
||||
@NonNull
|
||||
private TokenService tokenService;
|
||||
private final TokenService tokenService;
|
||||
|
||||
@NonNull
|
||||
private RedisCacheService redisCache;
|
||||
private final RedisCacheService redisCache;
|
||||
|
||||
@NonNull
|
||||
private GuavaCacheService guavaCache;
|
||||
private final GuavaCacheService guavaCache;
|
||||
|
||||
@NonNull
|
||||
private AuthenticationManager authenticationManager;
|
||||
private final AuthenticationManager authenticationManager;
|
||||
|
||||
@Resource(name = "captchaProducer")
|
||||
private Producer captchaProducer;
|
||||
|
||||
@ -55,8 +55,7 @@ public class TokenService {
|
||||
@Value("${token.autoRefreshTime}")
|
||||
private long autoRefreshTime;
|
||||
|
||||
@NonNull
|
||||
private RedisCacheService redisCache;
|
||||
private final RedisCacheService redisCache;
|
||||
|
||||
/**
|
||||
* 获取用户身份信息
|
||||
|
||||
@ -44,17 +44,13 @@ import org.springframework.stereotype.Service;
|
||||
@RequiredArgsConstructor
|
||||
public class UserDetailsServiceImpl implements UserDetailsService {
|
||||
|
||||
@NonNull
|
||||
private SysUserService userService;
|
||||
private final SysUserService userService;
|
||||
|
||||
@NonNull
|
||||
private SysMenuService menuService;
|
||||
private final SysMenuService menuService;
|
||||
|
||||
@NonNull
|
||||
private SysRoleService roleService;
|
||||
private final SysRoleService roleService;
|
||||
|
||||
@NonNull
|
||||
private TokenService tokenService;
|
||||
private final TokenService tokenService;
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
@ -20,8 +20,7 @@ import org.springframework.stereotype.Service;
|
||||
@RequiredArgsConstructor
|
||||
public class DataPermissionService {
|
||||
|
||||
@NonNull
|
||||
private SysUserService userService;
|
||||
private final SysUserService userService;
|
||||
|
||||
/**
|
||||
* 通过userId 校验当前用户 对 目标用户是否有操作权限
|
||||
|
||||
@ -31,15 +31,13 @@ public class SecurityConfig {
|
||||
/**
|
||||
* token认证过滤器
|
||||
*/
|
||||
@NonNull
|
||||
private JwtAuthenticationFilter jwtTokenFilter;
|
||||
private final JwtAuthenticationFilter jwtTokenFilter;
|
||||
|
||||
|
||||
/**
|
||||
* 跨域过滤器
|
||||
*/
|
||||
@NonNull
|
||||
private CorsFilter corsFilter;
|
||||
private final CorsFilter corsFilter;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -44,8 +44,7 @@ public class JwtTokenService {
|
||||
@Value("${token.secret}")
|
||||
private String secret;
|
||||
|
||||
@NonNull
|
||||
private RedisCacheService redisCache;
|
||||
private final RedisCacheService redisCache;
|
||||
|
||||
/**
|
||||
* 获取用户身份信息
|
||||
|
||||
@ -18,11 +18,9 @@ import org.springframework.stereotype.Component;
|
||||
@RequiredArgsConstructor
|
||||
public class GuavaCacheService {
|
||||
|
||||
@NonNull
|
||||
private SysConfigService configService;
|
||||
private final SysConfigService configService;
|
||||
|
||||
@NonNull
|
||||
private SysDeptService deptService;
|
||||
private final SysDeptService deptService;
|
||||
|
||||
public final AbstractGuavaCacheTemplate<String> configCache = new AbstractGuavaCacheTemplate<String>() {
|
||||
@Override
|
||||
|
||||
@ -24,8 +24,7 @@ import org.springframework.stereotype.Component;
|
||||
@RequiredArgsConstructor
|
||||
public class RedisCacheService {
|
||||
|
||||
@NonNull
|
||||
private RedisUtil redisUtil;
|
||||
private final RedisUtil redisUtil;
|
||||
|
||||
public RedisCacheTemplate<String> captchaCache;
|
||||
public RedisCacheTemplate<SystemLoginUser> loginUserCache;
|
||||
|
||||
@ -21,13 +21,11 @@ import org.springframework.stereotype.Service;
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class ConfigApplicationService {
|
||||
public class ConfigApplicationService {
|
||||
|
||||
@NonNull
|
||||
private ConfigModelFactory configModelFactory;
|
||||
private final ConfigModelFactory configModelFactory;
|
||||
|
||||
@NonNull
|
||||
private SysConfigService configService;
|
||||
private final SysConfigService configService;
|
||||
|
||||
public PageDTO<ConfigDTO> getConfigList(ConfigQuery query) {
|
||||
Page<SysConfigEntity> page = configService.page(query.toPage(), query.toQueryWrapper());
|
||||
|
||||
@ -16,8 +16,7 @@ import org.springframework.stereotype.Component;
|
||||
@RequiredArgsConstructor
|
||||
public class ConfigModelFactory {
|
||||
|
||||
@NonNull
|
||||
private SysConfigService configService;
|
||||
private final SysConfigService configService;
|
||||
|
||||
public ConfigModel loadById(Long configId) {
|
||||
SysConfigEntity byId = configService.getById(configId);
|
||||
|
||||
@ -25,14 +25,11 @@ import org.springframework.stereotype.Service;
|
||||
@RequiredArgsConstructor
|
||||
public class DeptApplicationService {
|
||||
|
||||
@NonNull
|
||||
private SysDeptService deptService;
|
||||
private final SysDeptService deptService;
|
||||
|
||||
@NonNull
|
||||
private SysRoleService roleService;
|
||||
private final SysRoleService roleService;
|
||||
|
||||
@NonNull
|
||||
private DeptModelFactory deptModelFactory;
|
||||
private final DeptModelFactory deptModelFactory;
|
||||
|
||||
|
||||
public List<DeptDTO> getDeptList(DeptQuery query) {
|
||||
|
||||
@ -20,8 +20,7 @@ import org.springframework.stereotype.Service;
|
||||
@RequiredArgsConstructor
|
||||
public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDeptEntity> implements SysDeptService {
|
||||
|
||||
@NonNull
|
||||
private SysUserMapper userMapper;
|
||||
private final SysUserMapper userMapper;
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
@ -17,8 +17,7 @@ import org.springframework.stereotype.Component;
|
||||
@RequiredArgsConstructor
|
||||
public class DeptModelFactory {
|
||||
|
||||
@NonNull
|
||||
private SysDeptService deptService;
|
||||
private final SysDeptService deptService;
|
||||
|
||||
public DeptModel loadById(Long deptId) {
|
||||
SysDeptEntity byId = deptService.getById(deptId);
|
||||
|
||||
@ -26,11 +26,9 @@ import org.springframework.stereotype.Service;
|
||||
public class LogApplicationService {
|
||||
|
||||
// TODO 命名到时候统一改成叫LoginLog
|
||||
@NonNull
|
||||
private SysLoginInfoService loginInfoService;
|
||||
private final SysLoginInfoService loginInfoService;
|
||||
|
||||
@NonNull
|
||||
private SysOperationLogService operationLogService;
|
||||
private final SysOperationLogService operationLogService;
|
||||
|
||||
public PageDTO<LoginLogDTO> getLoginInfoList(LoginLogQuery query) {
|
||||
Page<SysLoginInfoEntity> page = loginInfoService.page(query.toPage(), query.toQueryWrapper());
|
||||
|
||||
@ -32,11 +32,9 @@ import org.springframework.stereotype.Service;
|
||||
@RequiredArgsConstructor
|
||||
public class MenuApplicationService {
|
||||
|
||||
@NonNull
|
||||
private SysMenuService menuService;
|
||||
private final SysMenuService menuService;
|
||||
|
||||
@NonNull
|
||||
private MenuModelFactory menuModelFactory;
|
||||
private final MenuModelFactory menuModelFactory;
|
||||
|
||||
|
||||
public List<MenuDTO> getMenuList(MenuQuery query) {
|
||||
|
||||
@ -21,8 +21,7 @@ import org.springframework.stereotype.Service;
|
||||
@RequiredArgsConstructor
|
||||
public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenuEntity> implements SysMenuService {
|
||||
|
||||
@NonNull
|
||||
private SysRoleMenuMapper roleMenuMapper;
|
||||
private final SysRoleMenuMapper roleMenuMapper;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -16,8 +16,7 @@ import org.springframework.stereotype.Component;
|
||||
@RequiredArgsConstructor
|
||||
public class MenuModelFactory {
|
||||
|
||||
@NonNull
|
||||
private SysMenuService menuService;
|
||||
private final SysMenuService menuService;
|
||||
|
||||
public MenuModel loadById(Long menuId) {
|
||||
SysMenuEntity byId = menuService.getById(menuId);
|
||||
|
||||
@ -31,8 +31,7 @@ import org.springframework.stereotype.Service;
|
||||
@RequiredArgsConstructor
|
||||
public class MonitorApplicationService {
|
||||
|
||||
@NonNull
|
||||
private RedisTemplate<String, ?> redisTemplate;
|
||||
private final RedisTemplate<String, ?> redisTemplate;
|
||||
|
||||
public RedisCacheInfoDTO getRedisCacheInfo() {
|
||||
Properties info = (Properties) redisTemplate.execute((RedisCallback<Object>) RedisServerCommands::info);
|
||||
|
||||
@ -24,11 +24,9 @@ import org.springframework.stereotype.Service;
|
||||
@RequiredArgsConstructor
|
||||
public class NoticeApplicationService {
|
||||
|
||||
@NonNull
|
||||
private SysNoticeService noticeService;
|
||||
private final SysNoticeService noticeService;
|
||||
|
||||
@NonNull
|
||||
private NoticeModelFactory noticeModelFactory;
|
||||
private final NoticeModelFactory noticeModelFactory;
|
||||
|
||||
public PageDTO<NoticeDTO> getNoticeList(NoticeQuery query) {
|
||||
Page<SysNoticeEntity> page = noticeService.getNoticeList(query.toPage(), query.toQueryWrapper());
|
||||
|
||||
@ -16,8 +16,7 @@ import org.springframework.stereotype.Component;
|
||||
@RequiredArgsConstructor
|
||||
public class NoticeModelFactory {
|
||||
|
||||
@NonNull
|
||||
private SysNoticeService noticeService;
|
||||
private final SysNoticeService noticeService;
|
||||
|
||||
public NoticeModel loadById(Long noticeId) {
|
||||
SysNoticeEntity byId = noticeService.getById(noticeId);
|
||||
|
||||
@ -24,11 +24,9 @@ import org.springframework.stereotype.Service;
|
||||
@RequiredArgsConstructor
|
||||
public class PostApplicationService {
|
||||
|
||||
@NonNull
|
||||
private PostModelFactory postModelFactory;
|
||||
private final PostModelFactory postModelFactory;
|
||||
|
||||
@NonNull
|
||||
private SysPostService postService;
|
||||
private final SysPostService postService;
|
||||
|
||||
public PageDTO<PostDTO> getPostList(PostQuery query) {
|
||||
Page<SysPostEntity> page = postService.page(query.toPage(), query.toQueryWrapper());
|
||||
|
||||
@ -20,8 +20,7 @@ import org.springframework.stereotype.Service;
|
||||
@RequiredArgsConstructor
|
||||
public class SysPostServiceImpl extends ServiceImpl<SysPostMapper, SysPostEntity> implements SysPostService {
|
||||
|
||||
@NonNull
|
||||
private SysUserMapper userMapper;
|
||||
private final SysUserMapper userMapper;
|
||||
|
||||
/**
|
||||
* 校验岗位名称是否唯一
|
||||
|
||||
@ -15,8 +15,7 @@ import org.springframework.stereotype.Component;
|
||||
@RequiredArgsConstructor
|
||||
public class PostModelFactory {
|
||||
|
||||
@NonNull
|
||||
private SysPostService postService;
|
||||
private final SysPostService postService;
|
||||
|
||||
public PostModel loadById(Long postId) {
|
||||
SysPostEntity byId = postService.getById(postId);
|
||||
|
||||
@ -37,20 +37,15 @@ import org.springframework.stereotype.Service;
|
||||
@RequiredArgsConstructor
|
||||
public class RoleApplicationService {
|
||||
|
||||
@NonNull
|
||||
private RoleModelFactory roleModelFactory;
|
||||
private final RoleModelFactory roleModelFactory;
|
||||
|
||||
@NonNull
|
||||
private UserModelFactory userModelFactory;
|
||||
private final UserModelFactory userModelFactory;
|
||||
|
||||
@NonNull
|
||||
private SysRoleService roleService;
|
||||
private final SysRoleService roleService;
|
||||
|
||||
@NonNull
|
||||
private SysUserService userService;
|
||||
private final SysUserService userService;
|
||||
|
||||
@NonNull
|
||||
private SysMenuService menuService;
|
||||
private final SysMenuService menuService;
|
||||
|
||||
|
||||
public PageDTO<RoleDTO> getRoleList(RoleQuery query) {
|
||||
|
||||
@ -22,8 +22,7 @@ import org.springframework.stereotype.Service;
|
||||
@RequiredArgsConstructor
|
||||
public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRoleEntity> implements SysRoleService {
|
||||
|
||||
@NonNull
|
||||
private SysUserMapper userMapper;
|
||||
private final SysUserMapper userMapper;
|
||||
|
||||
@Override
|
||||
public boolean isRoleNameDuplicated(Long roleId, String roleName) {
|
||||
|
||||
@ -23,11 +23,9 @@ import org.springframework.stereotype.Component;
|
||||
@RequiredArgsConstructor
|
||||
public class RoleModelFactory {
|
||||
|
||||
@NonNull
|
||||
private SysRoleService roleService;
|
||||
private final SysRoleService roleService;
|
||||
|
||||
@NonNull
|
||||
private SysRoleMenuService roleMenuService;
|
||||
private final SysRoleMenuService roleMenuService;
|
||||
|
||||
public RoleModel loadById(Long roleId) {
|
||||
SysRoleEntity byId = roleService.getById(roleId);
|
||||
|
||||
@ -43,17 +43,13 @@ import org.springframework.stereotype.Service;
|
||||
@RequiredArgsConstructor
|
||||
public class UserApplicationService {
|
||||
|
||||
@NonNull
|
||||
private SysUserService userService;
|
||||
private final SysUserService userService;
|
||||
|
||||
@NonNull
|
||||
private SysRoleService roleService;
|
||||
private final SysRoleService roleService;
|
||||
|
||||
@NonNull
|
||||
private SysPostService postService;
|
||||
private final SysPostService postService;
|
||||
|
||||
@NonNull
|
||||
private UserModelFactory userModelFactory;
|
||||
private final UserModelFactory userModelFactory;
|
||||
|
||||
|
||||
public PageDTO<UserDTO> getUserList(SearchUserQuery<SearchUserDO> query) {
|
||||
|
||||
@ -19,17 +19,13 @@ import org.springframework.stereotype.Component;
|
||||
@RequiredArgsConstructor
|
||||
public class UserModelFactory {
|
||||
|
||||
@NonNull
|
||||
private SysUserService userService;
|
||||
private final SysUserService userService;
|
||||
|
||||
@NonNull
|
||||
private PostModelFactory postModelFactory;
|
||||
private final PostModelFactory postModelFactory;
|
||||
|
||||
@NonNull
|
||||
private DeptModelFactory deptModelFactory;
|
||||
private final DeptModelFactory deptModelFactory;
|
||||
|
||||
@NonNull
|
||||
private RoleModelFactory roleModelFactory;
|
||||
private final RoleModelFactory roleModelFactory;
|
||||
|
||||
public UserModel loadById(Long userId) {
|
||||
SysUserEntity byId = userService.getById(userId);
|
||||
|
||||
@ -25,11 +25,9 @@ import org.springframework.stereotype.Component;
|
||||
@RequiredArgsConstructor
|
||||
public class RateLimiterAspect {
|
||||
|
||||
@NonNull
|
||||
private RedisRateLimitChecker redisRateLimitChecker;
|
||||
private final RedisRateLimitChecker redisRateLimitChecker;
|
||||
|
||||
@NonNull
|
||||
private MapRateLimitChecker mapRateLimitChecker;
|
||||
private final MapRateLimitChecker mapRateLimitChecker;
|
||||
|
||||
|
||||
@Before("@annotation(rateLimiter)")
|
||||
|
||||
@ -20,8 +20,7 @@ import org.springframework.stereotype.Component;
|
||||
@Slf4j
|
||||
public class RedisRateLimitChecker extends AbstractRateLimitChecker{
|
||||
|
||||
@NonNull
|
||||
private RedisTemplate<Object, Object> redisTemplate;
|
||||
private final RedisTemplate<Object, Object> redisTemplate;
|
||||
|
||||
private final RedisScript<Long> limitScript = new DefaultRedisScript<>(limitScriptText(), Long.class);
|
||||
|
||||
|
||||
@ -27,8 +27,7 @@ import org.springframework.web.servlet.mvc.method.annotation.RequestBodyAdviceAd
|
||||
@RequiredArgsConstructor
|
||||
public class UnrepeatableInterceptor extends RequestBodyAdviceAdapter {
|
||||
|
||||
@NonNull
|
||||
private RedisUtil redisUtil;
|
||||
private final RedisUtil redisUtil;
|
||||
|
||||
@Override
|
||||
public boolean supports(MethodParameter methodParameter, Type targetType,
|
||||
|
||||
@ -23,8 +23,7 @@ import org.springframework.stereotype.Component;
|
||||
@RequiredArgsConstructor
|
||||
public class RedisUtil {
|
||||
|
||||
@NonNull
|
||||
public RedisTemplate redisTemplate;
|
||||
public final RedisTemplate redisTemplate;
|
||||
|
||||
/**
|
||||
* 缓存基本的对象,Integer、String、实体类等
|
||||
|
||||
@ -18,8 +18,7 @@ public class RedisCacheBean implements Cache {
|
||||
/**
|
||||
* 缓存仓库
|
||||
*/
|
||||
@NonNull
|
||||
private RedisUtil redisUtil;
|
||||
private final RedisUtil redisUtil;
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
|
||||
@ -35,8 +35,7 @@ public class GlobalTransactionConfig {
|
||||
/**
|
||||
* 注入事务管理器
|
||||
*/
|
||||
@NonNull
|
||||
private TransactionManager transactionManager;
|
||||
private final TransactionManager transactionManager;
|
||||
|
||||
/**
|
||||
* 配置事务拦截器
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user