fix: 修复循环依赖问题
- StudentServiceImpl改用@Lazy注入IMemberService - 解决MemberService和StudentService循环依赖
This commit is contained in:
parent
5ff4e34667
commit
ab084a1913
|
|
@ -15,8 +15,9 @@ import com.pangu.student.domain.vo.StudentVO;
|
||||||
import com.pangu.student.listener.StudentImportListener;
|
import com.pangu.student.listener.StudentImportListener;
|
||||||
import com.pangu.student.mapper.StudentMapper;
|
import com.pangu.student.mapper.StudentMapper;
|
||||||
import com.pangu.student.service.IStudentService;
|
import com.pangu.student.service.IStudentService;
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
@ -31,13 +32,20 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> implements IStudentService {
|
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> implements IStudentService {
|
||||||
|
|
||||||
private final StudentMapper studentMapper;
|
@Autowired
|
||||||
private final com.pangu.base.service.IRegionService regionService;
|
private StudentMapper studentMapper;
|
||||||
private final com.pangu.school.service.ISchoolService schoolService;
|
|
||||||
private final com.pangu.member.service.IMemberService memberService;
|
@Autowired
|
||||||
|
private com.pangu.base.service.IRegionService regionService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private com.pangu.school.service.ISchoolService schoolService;
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
@Autowired
|
||||||
|
private com.pangu.member.service.IMemberService memberService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@DataScope(deptAlias = "s", schoolAlias = "s")
|
@DataScope(deptAlias = "s", schoolAlias = "s")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue