Skip to content
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

Merged
merged 5 commits into from
Nov 22, 2024
Merged

feat: allow endpoint path customization #11369

merged 5 commits into from
Nov 22, 2024

Conversation

sdelamo
Copy link
Contributor

@sdelamo sdelamo commented Nov 22, 2024

For example, kamal expects health check to be in /up

Verified

This commit was signed with the committer’s verified signature.
ychin Yee Cheng Chin
For example, [kamal](https://kamal-deploy.org) expects health check to be in /up
@sdelamo sdelamo added the type: improvement A minor improvement to an existing feature label Nov 22, 2024
@@ -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))) {
Copy link
Contributor

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()

Copy link
Contributor Author

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?

Copy link
Contributor Author

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

@sdelamo sdelamo merged commit f84c039 into 4.8.x Nov 22, 2024
21 checks passed
@sdelamo sdelamo deleted the healtconfigurable branch November 22, 2024 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: improvement A minor improvement to an existing feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants