Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SpringBoot Cannot enhance @Configuration bean definition 'beanNamePlaceholderRegistryPostProcessor'

Tags:

spring-boot

I recently started getting this warning on start up of my Spring Boot application:

o.s.c.a.ConfigurationClassPostProcessor - Cannot enhance @Configuration bean definition 'beanNamePlaceholderRegistryPostProcessor' since its singleton instance has been created too early. The typical cause is a non-static @Bean method with a BeanDefinitionRegistryPostProcessor return type: Consider declaring such methods as 'static'.

I cannot figure out where it is coming from. I have no such classes ('beanNamePlaceholderRegistryPostProcessor', 'BeanDefinitionRegistryPostProcessor') in my app that I can find so not sure how to prevent this from happening.

Anyone have any ideas?

This question is slightly different to this one as that one seems to be with a class that the user has created.

like image 852
chrismacp Avatar asked Jan 30 '17 15:01

chrismacp


1 Answers

I finally discovered that beanNamePlaceholderRegistryPostProcessor is part of the Jasypt Spring Boot starter package.

I raised a ticket about it and the author replied immediately, indicating that it is nothing to worry about.

https://github.com/ulisesbocchio/jasypt-spring-boot/issues/45

You can ignore the warning if you want by adding the following to Logback (if you use that):

<logger name="org.springframework.context.annotation.ConfigurationClassPostProcessor" level="ERROR"/>
like image 144
chrismacp Avatar answered Nov 13 '22 10:11

chrismacp