今天项目build发现,可以被编译,但是启动的时候报:
Error creating bean with name ‘userServiceImpl’: Bean with name ‘userServiceImpl’ has been injected into other beans [studentServiceImpl] in its raw version as part of a circular reference, but has eventually been wrapped. This means that said other beans do not use the final version of the bean. This is often the result of over-eager type matching - consider using ‘getBeanNamesOfType’ with the ‘allowEagerInit’ flag turned off, for example.

解决:在userServiceImpl这个实现类上对studentServiceImpl这个实现类里同样@Autowried的地方加个@Lazy 懒加载

原因:
如果某个类想要使它在Spring启动时不加载我们听的最多的便是为其加上@Lazy注解