Unable to Proxy with Kotlin DSL #35985
Labels
for: stackoverflow
A question that's better suited to stackoverflow.com
status: invalid
An issue that we don't feel is valid
Hi all,
Not sure if this is a question or a known issue that I am hitting. (already asked in SO but no real answers arrived yet)
I have some beans defined/registered in an ApplicationContextInitializr via BeanDefinitionDsl
The implementation of these classes are look like below; first the AbstractStrategy
Then the classes inherited from this class;
And the factory class
Point (A) is where the problem arising. Abstract class uses the injected service to let callers know about it's supporting implementation.
Well here the problem is.
At the point (B); While the concrete strategies are being instantiated, the @PostConstruct works as expected and prints the supported strategy. Debugging says this is the instance itself of strategy.
At the point (C); While traversing the Set, I am receiving a NPE because the injected service that is used in point (A) looks null. In here the elements in the set, are instances of spring generated proxies pointing to instances from step #1 above.
The text was updated successfully, but these errors were encountered: