Dave Syer opened SPR-16787 and commented
I wanted to try and visualize the object graph. Various options exist, but the only ones that work rely on the LiveBeansView that comes from spring-context (also exposed by Spring Boot as an endpoint, which is used by all the viable visualization tools I found). Unfortunately, I think a modern Spring Boot application has too many beans that are not obviously dependent on one another according to the LiveBeansView, even though they clearly are. Probably this feature used to work when all your beans were declared explicitly in XML files. Now that we have @Configuration
and auto-configuration the same rules do not apply.
The quickest way to see the problem is probably with STS if you have it. Run an app in the Boot dashboard and open its "Properties" view. It renders the LiveBeansView as a tree (which isn't very helpful anyway, but that's a different story). Browse through it and you will see dozens of beans that are unconnected to anything else. E.g. @Configuration
classes do not have an imprint of the beans they created.
Perhaps we can add more data to the LiveBeansView, either in the existing fields ("links" etc.) or in some new fields that express the changes that seem to have taken place?
Affects: 4.3.16
Attachments: - 2018-05-02-103154_1368x768_scrot.png (326.78 kB)
Issue Links: - #21438 LiveBeansView should support double quotes in application context id
Comment From: spring-projects-issues
@dsyer commented
Attached above is a screenshot of a graph generated by this tool (which only works with Spring Boot 1.x): https://github.com/aigor/spring-beans-visualized. It's a bit faint, but if you squint you can see that only a few beans here and there are connected to each other. The links are the same as the ones in LiveBeansView. The app is an empty Spring Boot web app with actuator enabled.
Comment From: spring-projects-issues
@snicoll commented
also exposed by Spring Boot as an endpoint,
Actually we don't. We use the content of the context as a mean to describe the available beans so whatever complains you have here means that the application context should expose those links, either in the bean definition or in some sort of lower-level API.
What do you think @jhoeller ?
Comment From: sdeleuze
Based on recent discussions, I think we are not going to evolve LiveBeansView
. Indeed Boot is not using it anymore, only STS does for non Boot apps, so I think it is reasonable to close this issue.
Comment From: dsyer
I disagree. I do not mourn the passing of LiveBeansView, but I would like to have some high-quality metadata. Is there a better place to discuss that?
Comment From: sdeleuze
I don't question the need, I just say LiveBeansView
is likely to be deprecated and that the need should be discussed at another level, likely on Boot actuator side.
Comment From: bclozel
Should we use this issue instead to deprecate LiveBeansView
then?
Comment From: sdeleuze
@bclozel I have chosen to create a dedicated issue for that since the original purpose of this issue is different and could cause potentially some confusion.