-
Notifications
You must be signed in to change notification settings - Fork 40.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Beans are not getting created or exposed to get utilized - Spring Boot 3.0.0 and above #34434
Comments
This sounds like a duplicate of #34379. Do you have any spaces or other unusual characters in the path of the application? |
I was having some spaces in both the logger and demo application. Post removing the spaces, yes the beans were reflecting with spring boot 3.0.3. But I am still not able to see the beans of logger application in /actuator/beans endpoint for demo application. That means beans are still not getting exposed from logger application to demo application, provided there is no space in the application path. Spring Boot version : 3.0.0 |
Thanks for the update.
I can't tell why that would be happening from the little that you have described so far. One guess is that your logger library hasn't been updated to use the new AutoConfiguration.imports file. If that doesn't help and you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue. |
Thanks @wilkinsona - Updated the library with new AutoConfiguration.imports.file It works now. |
Thanks for letting us know. |
Spring Boot version : 3.0.3 and 3.0.2
Java version : 17
There is a demo java spring boot application which consumes a logger java spring boot project (which is exposed as a maven dependency) which basically has some aspects written to intercept the controller and service class method to print ENTRY and EXIT logs. Post performing the upgrade to the logger library project with
spring boot 3.0.3
there were no beans getting created for the classes like the aspect classes, classes annotated with@RestController
etc. Then, I downgraded the version ofspring boot to 3.0.2
and with this beans started getting created and I was able to see the beans reflecting in /actuator/beans endpoint for logger application.Now, this upgraded library (logger application) got consumed in the demo application which is also running on spring boot 3.0.2 and when I tried to hit /actuator/beans inside the demo application, I was not getting any classes (aspect classes) which are exposed as a beans from the logger application.
Is there any changes made to spring aop as part of the spring framework 6 ? or is there any additional steps got added to expose a bean so that it can be utilized in different application where the logger application is getting consumed.
Sample Configuration class (logger project) :
POM demo application :
The text was updated successfully, but these errors were encountered: