报错信息如下 :
***************************
APPLICATION FAILED TO START
***************************
Description:
The dependencies of some of the beans in the application context form a cycle:
┌──->──┐
| com.github.pagehelper.autoconfigure.PageHelperAutoConfiguration
└──<-──┘
Action:
Relying upon circular references is discouraged and they are prohibited by default. Update your application to remove the dependency cycle between beans. As a last resort, it may be possible to break the cycle automatically by setting spring.main.allow-circular-references to true.
Process finished with exit code 1
解决办法 :
将启动类中的 main 方法修改为如下 即可
@SpringBootApplication
public class PageApplication {
public static void main(String[] args) {
SpringApplication springApplication = new SpringApplication(PageApplication.class);
springApplication.setAllowCircularReferences(Boolean.TRUE);
springApplication.run(args);
// SpringApplication.run(PageApplication.class,args);
}
}