Closed xenoterracide closed 2 months ago
Hi @xenoterracide,
For starters, it's still CGLIB just rather our port of CGLIB which we now maintain.
Regarding the exception you've encountered, ConfigurationClassEnhancer$BeanFactoryAwareMethodInterceptor
likely signals that there was an issue related to a dynamic subclass of your @Configuration
class.
To avoid that, try @Configuration(proxyBeanMethods = false)
and let us know if that solves your problem.
As a side note, we don't recommend that a @Configuration
class implement BeanFactoryPostProcessor
. Instead, a @Configuration
class should contain a static
@Bean
method that returns an instance of your BeanFactoryPostProcessor
.
As a side note, we don't recommend that a @Configuration class implement BeanFactoryPostProcessor. Instead, a @Configuration class should contain a static @Bean method that returns an instance of your BeanFactoryPostProcessor.
for some reason I never considered that, or using statics...
For starters, it's still CGLIB just rather our port of CGLIB which we now maintain.
well now I wonder if bytebuddy has the same issue
To avoid that, try @Configuration(proxyBeanMethods = false) and let us know if that solves your problem.
It does, although I think I prefer the export
because I can solve that in 1 place instead of N, or in theory at least less places (since I have N libraries). I have @SpringBootApplication(proxyBeanMethods = false)
so I figured I wouldn't have to do it again. For some, unknown, reason I presumed that would be a default; like the component scanning package is for the whole app by default.
I still don't understand why the export
helps here. Might be worth documenting these options.
well now I wonder if bytebuddy has the same issue
and why I don't seem to have it with hibernate, which I would think has to accomplish something similar with its magic.
I think this is just a duplicate of #32671 re-open if you disagree
This is hopefully just a lack of understanding on how spring "cglib" support is supposed to work (in quotes because it's not cglib anymore right?) or how exactly a reflective access needs
exports
instead of justopens
. Sorry if this isn't simply an understanding problem vs an issue which could be fixed to allow my module to work without adding anexports ... to spring...
Adding this fixes it.
org.springframework:spring-core:6.1.11