micronaut-projects / micronaut-core

Micronaut Application Framework
http://micronaut.io
Apache License 2.0
6.05k stars 1.06k forks source link

Property endpoints.all.path is concat with micronaut.server.context-path #7552

Open weesftw opened 2 years ago

weesftw commented 2 years ago

Expected Behavior

It would be attractive to keep them on separate paths, as they are different contexts. Or have some variable that allows you to make this distinction because they are totally different routes.

Inside the processors package in the management module, in class AbstractEndpointRouteBuilder there is the resolveUriByRouteId() method returning uriNamingStrategy.resolveUri() which does the proper concatenation. If it makes sense for the Micronaut context, would allowing a configuration that changes this behavior for greater flexibility be interesting? I'm glad in conttribute.

Actual Behaviour

Management endpoints such as /health would be available at the URI localhost:9090/foo/fff/health instead of localhost:9090/fff/health.

There is an issue that has been closed similar to this issue, but with no apparent conclusion.

Steps To Reproduce

Set this properties in application.yml:

micronaut.server.context-path=/foo
endpoints.all.path=/fff

Environment Information

Ubuntu 22.04 Java 11

Example Application

No response

Version

3.5.x

agugan commented 2 years ago

I am willing to pick this up. @graemerocher

vexxuh commented 1 year ago

I don't see a resolution to this issue. I have not worked on this project in a while so I don't mind grabbing this if @agugan has not worked on a resolution!

graemerocher commented 1 year ago

feel free

ginaesps commented 1 year ago

Hello! Is this issue already solved, or could I take it?

graemerocher commented 1 year ago

Sure go for it

ginaesps commented 1 year ago

I'm new in here and have read documentation. Where would you recommend me to start so I can get a better grasp of the issue? And, is there a Slack/Discord or some other kind or community where I can ask for help?

graemerocher commented 1 year ago

there is a gitter/matrix community https://micronaut.io/2022/04/13/how-to-access-the-micronaut-gitter-community-from-the-element-matrix-client/