-
Phillip Webb authored
Update `EndpointDiscoverer` so that `@Endpoint` and `@EndpointExtension` beans are created as late as possible. Prior to this commit, endpoint beans and extension beans would be created during the discovery phase which could cause early bean initialization. The problem was especially nasty when using an embedded servlet container since `ServletEndpointRegistrar` is loaded as the container is initialized. This would trigger discovery and load all endpoint beans, including the health endpoint, and all health indicator beans. Fixes gh-20714
49a21ded