[英]"log4j:WARN No appenders could be found for logger" error after upgrading Spring Boot from 2.4.6 to 2.6.6
[英]Spring Boot Application giving 404 after upgrading to springboot 2.6.6
我已将 web 应用程序的 spring 引导版本从 2.1.2 更改为 2.6.6。 这是POM---
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.6</version>
<relativePath>/</relativePath> <!-- lookup parent from repository -->
</parent>
A1 版本升级后,我遇到了一些循环依赖问题,我使用带有 @Lazy 注释的构造函数注入解决了这些问题。 下面是例子---
@Autowired
public ServiceImpl(@Lazy ABCService abcService,
@Lazy XYZService xyzService,
@Lazy PQRMapper pqrMapper,
@Lazy PQRService pqrRepositoryService) {
super();
this.abcService = abcService;
this.xyzService = xyzService;
this.pqrMapper = pqrMapper;
this.pqrRepositoryService = pqrRepositoryService;
}
谁能建议我能做些什么来解决这个问题。
我在浏览了所有发布文档后发现了这个问题,我发现 spring-boot 禁用了 default-dispatcher-servlet。 所以我们需要用属性启用它-
server.servlet.register-default-servlet=true
这个解决方案对我有用。
在日志中有信息exposing one endpoint beneath base path '/internal'
也许您尝试使用的那些控制器未创建也许 package 未扫描
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.