Endpointwhich is removed from exposure.exclude and added into exposure.include in a BeanPostProcessor. Now that I'm moving away from
@ConditionalOnAvailableEndpointit's returning 404 and is not actually exposed. I guess available endpoint is the combination of enabled and exposed. With
@ConditionalOnEnabledEndpointit works fine, so I assume it's enabled. It's also exposed in the BeanPostProcessor. My guess of the problem is that by the time of Condition is evaluated, the bean processor has not exposed it. But how to solve this problem? FYI, this is in an internal spring-boot library.
@Endpoints. When I expose it in the properties file in tests, it works fine as those properties are resolved and evaluated before
@ConditionalOnAvailableEndpoint, however, I want to avoid forcing everyone to manually put some configs, and rather I expose it programmatically
/metricsendpoint. Bydefault, it's
Too many open filesI tried several solutions until migrating spring boot 2.2.2 then jetty but after a while I still receive
org.eclipse.jetty.server.HttpChannel - handleException /api/sender java.io.IOException: Too many open filesWhat can be the problem ? Thank you
EnvironmentPostProcessorgets evaluated before those
@Conditional...s are evaluated? 2. If I add it there, then if clients want to say exclude it in their
application.yml, then what's the behaviour? what takes the precedence? My guess is that it can be handled in the
management.endpoints.web.exposure.includeis that it takes a comma-separated list. So in this case, if you add a new property source for each endpoint (in my case they are in different modules and each has its own EnvPostProcessor), then the one which is first in the order, is the one that's exposed, and the rest is not exposed. In this case, is it fair to solution to scan through
environment.propertySourcesand find the first instance where
management.endpoints.web.exposure.includeis defined and alter (append new endpoint) it there? Or is there a better way?