【发布时间】:2015-11-07 09:06:44
【问题描述】:
我有一个 Spring Boot 应用程序,并且在启动时收到以下消息:
7701 [main] DEBUG o.s.w.s.h.BeanNameUrlHandlerMapping - Rejected bean name 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor': no URL paths identified
7701 [main] DEBUG o.s.w.s.h.BeanNameUrlHandlerMapping - Rejected bean name 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor': no URL paths identified
7701 [main] DEBUG o.s.w.s.h.BeanNameUrlHandlerMapping - Rejected bean name 'org.springframework.context.annotation.internalRequiredAnnotationProcessor': no URL paths identified
7701 [main] DEBUG o.s.w.s.h.BeanNameUrlHandlerMapping - Rejected bean name 'org.springframework.context.annotation.internalCommonAnnotationProcessor': no URL paths identified
7701 [main] DEBUG o.s.w.s.h.BeanNameUrlHandlerMapping - Rejected bean name 'org.springframework.context.annotation.internalPersistenceAnnotationProcessor': no URL paths identified
7701 [main] DEBUG o.s.w.s.h.BeanNameUrlHandlerMapping - Rejected bean name 'application': no URL paths identified
7701 [main] DEBUG o.s.w.s.h.BeanNameUrlHandlerMapping - Rejected bean name 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor': no URL paths identified
7701 [main] DEBUG o.s.w.s.h.BeanNameUrlHandlerMapping - Rejected bean name 'org.springframework.context.annotation.ConfigurationClassPostProcessor.enhancedConfigurationProcessor': no URL paths identified
7702 [main] DEBUG o.s.w.s.h.BeanNameUrlHandlerMapping - Rejected bean name 'bookingController': no URL paths identified
我在应用中使用的每个 @Autowired 都会发生这种情况。
我的应用程序的唯一配置是:
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
知道为什么我会收到这些消息吗?
在这些消息和其他人说这可能是默认注释处理程序和我没有定义的自定义注释处理程序之间的冲突之后,我尝试使用谷歌搜索。
这些是我的 gradle 依赖项
dependencies {
compile('org.springframework.boot:spring-boot-autoconfigure')
compile('org.springframework.boot:spring-boot-starter-web')
compile("org.springframework.boot:spring-boot-starter-data-rest")
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.6.1')
compile('org.springframework.boot:spring-boot-starter-security')
compile("mysql:mysql-connector-java:5.1.34")
testCompile("junit:junit")
testCompile("org.springframework.boot:spring-boot-starter-test")
testCompile("com.jayway.jsonpath:json-path")
testCompile("com.jayway.jsonpath:json-path-assert:0.9.1")
}
在我的类路径中,我没有任何可能出现这种情况的设置。
【问题讨论】:
-
我添加了我现在使用的依赖项。
-
您可以忽略这些消息,如果您查看消息,您看到的只是调试信息。
BeanNameUrlHandlerMapping查看 bean 的名称并检查该名称是否可以转换为 URL。这些消息仅供您参考,您可以(并且应该)忽略它们,因为您对它们无能为力。您可以禁用调试日志记录,然后您将看不到它们。因此,它与您的依赖关系或它的正常行为无关。 -
实际上我的应用程序遇到了同样的问题(在调试模式日志中):github.com/vdenotaris/spring-boot-security-saml-sample
标签: spring url spring-boot