refactor: remove unused logger imports and related fields from manager and controller classes
This commit is contained in:
@@ -6,8 +6,6 @@ import com.onixbyte.helix.service.AuthService;
|
||||
import com.onixbyte.helix.service.TokenService;
|
||||
import com.onixbyte.helix.service.UserService;
|
||||
import com.onixbyte.helix.shared.TokenConstant;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@@ -27,7 +25,6 @@ import java.time.Duration;
|
||||
@RequestMapping("/auth")
|
||||
public class AuthController {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(AuthController.class);
|
||||
private final AuthService authService;
|
||||
private final TokenService tokenService;
|
||||
private final UserService userService;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.onixbyte.helix.domain.web.request;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.onixbyte.helix.manager;
|
||||
|
||||
import com.onixbyte.helix.shared.CacheName;
|
||||
import com.onixbyte.helix.domain.entity.Asset;
|
||||
import com.onixbyte.helix.mapper.AssetMapper;
|
||||
import com.onixbyte.helix.repository.AssetRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
@@ -13,12 +12,10 @@ import org.springframework.stereotype.Component;
|
||||
@Component
|
||||
public class AssetManager {
|
||||
|
||||
private final AssetMapper assetMapper;
|
||||
private final AssetRepository assetRepository;
|
||||
|
||||
@Autowired
|
||||
public AssetManager(AssetMapper assetMapper, AssetRepository assetRepository) {
|
||||
this.assetMapper = assetMapper;
|
||||
public AssetManager(AssetRepository assetRepository) {
|
||||
this.assetRepository = assetRepository;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@ import com.onixbyte.helix.exception.BizException;
|
||||
import com.onixbyte.helix.mapper.AuthorityMapper;
|
||||
import com.onixbyte.helix.repository.AuthorityRepository;
|
||||
import com.onixbyte.helix.shared.CacheName;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.data.domain.Example;
|
||||
@@ -25,7 +23,6 @@ import java.util.Optional;
|
||||
@Component
|
||||
public class AuthorityManager {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(AuthorityManager.class);
|
||||
private final AuthorityMapper authorityMapper;
|
||||
private final AuthorityRepository authorityRepository;
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.onixbyte.helix.manager;
|
||||
|
||||
import com.onixbyte.helix.domain.entity.Department;
|
||||
import com.onixbyte.helix.mapper.DepartmentMapper;
|
||||
import com.onixbyte.helix.repository.DepartmentRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
@@ -13,12 +12,10 @@ import java.util.Optional;
|
||||
@Component
|
||||
public class DepartmentManager {
|
||||
|
||||
private final DepartmentMapper departmentMapper;
|
||||
private final DepartmentRepository departmentRepository;
|
||||
|
||||
@Autowired
|
||||
public DepartmentManager(DepartmentMapper departmentMapper, DepartmentRepository departmentRepository) {
|
||||
this.departmentMapper = departmentMapper;
|
||||
public DepartmentManager(DepartmentRepository departmentRepository) {
|
||||
this.departmentRepository = departmentRepository;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@ package com.onixbyte.helix.manager;
|
||||
|
||||
import com.onixbyte.helix.domain.entity.Menu;
|
||||
import com.onixbyte.helix.mapper.MenuMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -11,7 +9,7 @@ import java.util.List;
|
||||
|
||||
@Component
|
||||
public class MenuManager {
|
||||
private static final Logger log = LoggerFactory.getLogger(MenuManager.class);
|
||||
|
||||
private final MenuMapper menuMapper;
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.onixbyte.helix.manager;
|
||||
|
||||
import com.onixbyte.helix.domain.entity.Position;
|
||||
import com.onixbyte.helix.mapper.PositionMapper;
|
||||
import com.onixbyte.helix.repository.PositionRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
@@ -11,12 +10,10 @@ import org.springframework.stereotype.Component;
|
||||
@Component
|
||||
public class PositionManager {
|
||||
|
||||
private final PositionMapper positionMapper;
|
||||
private final PositionRepository positionRepository;
|
||||
|
||||
@Autowired
|
||||
public PositionManager(PositionMapper positionMapper, PositionRepository positionRepository) {
|
||||
this.positionMapper = positionMapper;
|
||||
public PositionManager(PositionRepository positionRepository) {
|
||||
this.positionRepository = positionRepository;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.onixbyte.helix.manager;
|
||||
|
||||
import com.onixbyte.helix.mapper.RoleAuthorityMapper;
|
||||
import com.onixbyte.helix.repository.RoleAuthorityRepository;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -10,11 +9,9 @@ import org.springframework.stereotype.Component;
|
||||
public class RoleAuthorityManager {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(RoleAuthorityManager.class);
|
||||
private final RoleAuthorityRepository roleAuthorityRepository;
|
||||
private final RoleAuthorityMapper roleAuthorityMapper;
|
||||
|
||||
public RoleAuthorityManager(RoleAuthorityRepository roleAuthorityRepository, RoleAuthorityMapper roleAuthorityMapper) {
|
||||
this.roleAuthorityRepository = roleAuthorityRepository;
|
||||
public RoleAuthorityManager(RoleAuthorityMapper roleAuthorityMapper) {
|
||||
this.roleAuthorityMapper = roleAuthorityMapper;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.onixbyte.helix.manager;
|
||||
import com.onixbyte.helix.domain.database.query.wrapper.QueryRoleWrapper;
|
||||
import com.onixbyte.helix.domain.entity.Role;
|
||||
import com.onixbyte.helix.exception.BizException;
|
||||
import com.onixbyte.helix.mapper.RoleAuthorityMapper;
|
||||
import com.onixbyte.helix.mapper.RoleMapper;
|
||||
import com.onixbyte.helix.repository.RoleRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -20,13 +19,11 @@ public class RoleManager {
|
||||
|
||||
private final RoleMapper roleMapper;
|
||||
private final RoleRepository roleRepository;
|
||||
private final RoleAuthorityMapper roleAuthorityMapper;
|
||||
|
||||
@Autowired
|
||||
public RoleManager(RoleMapper roleMapper, RoleRepository roleRepository, RoleAuthorityMapper roleAuthorityMapper) {
|
||||
public RoleManager(RoleMapper roleMapper, RoleRepository roleRepository) {
|
||||
this.roleMapper = roleMapper;
|
||||
this.roleRepository = roleRepository;
|
||||
this.roleAuthorityMapper = roleAuthorityMapper;
|
||||
}
|
||||
|
||||
public void validateRoles(List<Long> roleIds) {
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package com.onixbyte.helix.manager;
|
||||
|
||||
import com.onixbyte.helix.domain.entity.UserRole;
|
||||
import com.onixbyte.helix.domain.entity.embeddable.UserRoleId;
|
||||
import com.onixbyte.helix.mapper.UserRoleMapper;
|
||||
import com.onixbyte.helix.repository.UserRoleRepository;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -15,12 +13,10 @@ import java.util.List;
|
||||
public class UserRoleManager {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(UserRoleManager.class);
|
||||
private final UserRoleMapper userRoleMapper;
|
||||
private final UserRoleRepository userRoleRepository;
|
||||
|
||||
@Autowired
|
||||
public UserRoleManager(UserRoleMapper userRoleMapper, UserRoleRepository userRoleRepository) {
|
||||
this.userRoleMapper = userRoleMapper;
|
||||
public UserRoleManager(UserRoleRepository userRoleRepository) {
|
||||
this.userRoleRepository = userRoleRepository;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.onixbyte.helix.repository;
|
||||
import com.onixbyte.helix.domain.entity.Authority;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
|
||||
@@ -5,8 +5,6 @@ import com.onixbyte.helix.domain.common.TreeNode;
|
||||
import com.onixbyte.helix.manager.MenuManager;
|
||||
import com.onixbyte.helix.utils.SecurityUtil;
|
||||
import com.onixbyte.helix.utils.TreeUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -14,7 +12,7 @@ import java.util.List;
|
||||
|
||||
@Service
|
||||
public class MenuService {
|
||||
private static final Logger log = LoggerFactory.getLogger(MenuService.class);
|
||||
|
||||
private final MenuManager menuManager;
|
||||
|
||||
@Autowired
|
||||
|
||||
Reference in New Issue
Block a user