spring-boot/spring-boot-project/spring-boot-actuator-autoco...
Andy Wilkinson e237390e66 Ignore prototype DataSource beans for metrics and health
Previously, if a prototype DataSource bean was defined, Actuator's
metrics and health would try to access an instance of it. At best
this was wasteful as the new instance would only be used for metrics
and health and would not be indicative of the app's DataSource usage.
At worst, it could cause a failure in the unusual case of the
prototype bean definition requiring arguments to be supplied using
ObjectProvider.getObject(Object...) or the like.

This commit address the problem by ignoring prototype DataSource
for metrics and health.

Other types of beans for which Actuator provides metrics and health
are similarly affected. They have not be fixed here as the situation
is so unusual. Should another problem arise in the future, it can be
addressed at that time when there's a clear need.

Closes gh-44706
2025-03-18 19:10:45 +00:00
..
src Ignore prototype DataSource beans for metrics and health 2025-03-18 19:10:45 +00:00
build.gradle Merge branch '3.3.x' into 3.4.x 2025-03-18 15:25:57 +01:00