处理循环依赖问题
This commit is contained in:
parent
596fe32678
commit
84be61beae
@ -21,6 +21,7 @@ import ink.wgink.util.request.RequestUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -47,6 +48,7 @@ public class AppSignServiceImpl extends BaseAppSignService implements IAppSignSe
|
||||
private IAppVersionService appVersionService;
|
||||
@Autowired
|
||||
private PasswordEncoder passwordEncoder;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IUserService userService;
|
||||
@Autowired(required = false)
|
||||
|
@ -9,6 +9,7 @@ import ink.wgink.service.user.service.IUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.security.authentication.AuthenticationManager;
|
||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||
@ -55,12 +56,11 @@ public class OAuth2AuthorizationServerConfig extends AuthorizationServerConfigur
|
||||
private IUserService userService;
|
||||
@Autowired
|
||||
private OAuth2ClientDetailsServiceImpl oAuth2ClientDetailsService;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private OAuth2ClientTokenServiceImpl oAuth2ClientTokenService;
|
||||
@Autowired
|
||||
private AuthenticationManager authenticationManager;
|
||||
@Autowired
|
||||
private PasswordEncoder passwordEncoder;
|
||||
|
||||
|
||||
@Override
|
||||
|
@ -14,6 +14,7 @@ import ink.wgink.service.department.service.IDepartmentAdjustmentService;
|
||||
import ink.wgink.service.department.service.IDepartmentUserAdjustmentService;
|
||||
import ink.wgink.service.user.service.IUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
@ -35,6 +36,7 @@ public class DepartmentAdjustmentServiceImpl extends DefaultBaseService implemen
|
||||
|
||||
@Autowired
|
||||
private IDepartmentAdjustmentDao departmentAdjustmentDao;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IUserService userService;
|
||||
@Autowired
|
||||
|
@ -36,6 +36,7 @@ import ink.wgink.util.map.HashMapUtil;
|
||||
import ink.wgink.util.string.WStringUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@ -58,6 +59,7 @@ public class DepartmentServiceImpl extends DefaultBaseService implements IDepart
|
||||
@Autowired
|
||||
private IDepartmentDao departmentDao;
|
||||
@Autowired
|
||||
@Lazy
|
||||
private IDepartmentUserService departmentUserService;
|
||||
@Autowired
|
||||
private IDepartmentAdjustmentService departmentAdjustmentService;
|
||||
|
@ -27,6 +27,7 @@ import ink.wgink.util.thread.CachedThreadPoolUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
@ -50,6 +51,7 @@ public class DepartmentUserServiceImpl extends DefaultBaseService implements IDe
|
||||
private IDepartmentService departmentService;
|
||||
@Autowired
|
||||
private IDepartmentAdjustmentService departmentAdjustmentService;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IUserBaseService userBaseService;
|
||||
@Autowired(required = false)
|
||||
|
@ -18,6 +18,7 @@ import ink.wgink.service.group.service.IGroupUserService;
|
||||
import ink.wgink.util.thread.CachedThreadPoolUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -40,8 +41,10 @@ public class GroupUserServiceImpl extends DefaultBaseService implements IGroupUs
|
||||
|
||||
@Autowired
|
||||
private IGroupUserDao groupUserDao;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IUserBaseService userBaseService;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IGroupService groupService;
|
||||
@Autowired(required = false)
|
||||
|
@ -18,6 +18,7 @@ import ink.wgink.service.position.service.IPositionUserService;
|
||||
import ink.wgink.util.thread.CachedThreadPoolUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -40,8 +41,10 @@ public class PositionUserServiceImpl extends DefaultBaseService implements IPosi
|
||||
|
||||
@Autowired
|
||||
private IPositionUserDao positionUserDao;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IUserBaseService userBaseService;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IPositionService positionService;
|
||||
@Autowired(required = false)
|
||||
|
@ -12,7 +12,6 @@ import ink.wgink.service.department.service.IDepartmentService;
|
||||
import ink.wgink.service.department.service.IDepartmentUserService;
|
||||
import ink.wgink.service.role.service.IRoleDepartmentUserService;
|
||||
import ink.wgink.service.role.service.IRoleUserService;
|
||||
import ink.wgink.service.user.service.IUserService;
|
||||
import ink.wgink.util.ArrayListUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -35,8 +34,6 @@ public class RoleDepartmentUserServiceImpl extends DefaultBaseService implements
|
||||
@Autowired
|
||||
private IRoleUserService roleUserService;
|
||||
@Autowired
|
||||
private IUserService userService;
|
||||
@Autowired
|
||||
private IDepartmentService departmentService;
|
||||
@Autowired
|
||||
private IDepartmentUserService departmentUserService;
|
||||
|
@ -15,7 +15,6 @@ import ink.wgink.pojo.dtos.role.RoleUserDTO;
|
||||
import ink.wgink.pojo.dtos.user.UserDTO;
|
||||
import ink.wgink.pojo.pos.RolePO;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.service.department.service.IDepartmentUserService;
|
||||
import ink.wgink.service.role.dao.IRoleUserDao;
|
||||
import ink.wgink.service.role.service.IRoleService;
|
||||
import ink.wgink.service.role.service.IRoleUserService;
|
||||
@ -23,6 +22,7 @@ import ink.wgink.service.user.pojo.pos.UserPO;
|
||||
import ink.wgink.util.thread.CachedThreadPoolUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
@ -42,12 +42,12 @@ public class RoleUserServiceImpl extends DefaultBaseService implements IRoleUser
|
||||
|
||||
@Autowired
|
||||
private IRoleUserDao roleUserDao;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IRoleService roleService;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private IUserBaseService userBaseService;
|
||||
@Autowired
|
||||
private IDepartmentUserService departmentUserService;
|
||||
@Autowired(required = false)
|
||||
private IRoleUserSaveAfterHandler roleUserSaveAfterHandler;
|
||||
@Autowired(required = false)
|
||||
|
Loading…
Reference in New Issue
Block a user