我最近开始在启动Spring Boot应用程序时收到此警告:
oscaConfigurationClassPostProcessor - 无法增强@Configuration bean定义'beanNamePlaceholderRegistryPostProcessor',因为它的单例实例创建得太早.典型的原因是具有BeanDefinitionRegistryPostProcessor返回类型的非静态@Bean方法:请考虑将此类方法声明为"static".
我无法弄清楚它来自哪里.我在我的应用程序中没有这样的类('beanNamePlaceholderRegistryPostProcessor','BeanDefinitionRegistryPostProcessor'),所以我不知道如何防止这种情况发生.
有人有主意吗?
这个问题是略有不同的这一个作为一个似乎是与用户已创建的类.
我终于发现beanNamePlaceholderRegistryPostProcessor是 Jasypt Spring Boot 启动包的一部分。
我提了个票,作者马上回复,表示没什么好担心的。
https://github.com/ulisesbocchio/jasypt-spring-boot/issues/45
如果需要,您可以通过将以下内容添加到 Logback(如果您使用它)来忽略警告:
<logger name="org.springframework.context.annotation.ConfigurationClassPostProcessor" level="ERROR"/>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4899 次 |
| 最近记录: |