使用spring-cloud-config-starter时,日志中会显示以下消息
INFO 1 --- [main] trationDelegate $ BeanPostProcessorChecker:类型为[org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration $$ EnhancerBySpringCGLIB $$ 51f9b0ce]的Bean'org.springframework.cloud.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration'不符合条件由所有BeanPostProcessor处理(例如:不具备自动代理资格)
我尝试了
logging:
level:
org.springframework.context.support.PostProcessorRegistrationDelegate$$BeanPostProcessorChecker: WARN
root: WARN
和
logging:
level:
org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker: WARN
root: WARN
和
logging:
level:
org.springframework.context.support.PostProcessorRegistrationDelegate.BeanPostProcessorChecker: WARN
root: WARN
在配置服务器的application.yml
和bootstrap.yml
中,但它仍然出现。
答案 0 :(得分:1)
内部类名称需要在application.yml中进行特殊处理:
logging:
level:
org.springframework.context.support.[PostProcessorRegistrationDelegate$BeanPostProcessorChecker]: WARN
例如参见:https://github.com/spring-projects/spring-kafka/issues/714
要在属性键名称中包含这些“特殊字符”,您需要利用Spring Boot中基于地图的绑定规则:https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-Configuration-Binding#map-based-binding