-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat: allow endpoint path customization #11369
Conversation
For example, [kamal](https://kamal-deploy.org) expects health check to be in /up
.../src/main/java/io/micronaut/management/endpoint/processors/AbstractEndpointRouteBuilder.java
Outdated
Show resolved
Hide resolved
…essors/AbstractEndpointRouteBuilder.java
management/src/main/java/io/micronaut/management/endpoint/EndpointConfiguration.java
Outdated
Show resolved
Hide resolved
management/src/main/java/io/micronaut/management/endpoint/EndpointConfiguration.java
Outdated
Show resolved
Hide resolved
@@ -132,6 +134,12 @@ protected Optional<String> resolveActiveEndPointId(Class<?> declaringType) { | |||
BeanDefinition<?> beanDefinition = opt.get(); | |||
if (beanDefinition.hasStereotype(Endpoint.class)) { | |||
String id = beanDefinition.stringValue(Endpoint.class).orElse(null); | |||
if (beanContext.containsBean(EndpointConfiguration.class, Qualifiers.byName(id))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably better to use beanContext.getProvider
and then isPresent()
followed by get()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is better? Is it more performant to retrieve a bean via the BeanProvider
API vs the BeanContext
API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed to use BeanProvider here 85076fe
|
For example, kamal expects health check to be in /up