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

Spring Boot MVC: add Spring Boot Actuator #198

Closed
pascalgrimaud opened this issue Nov 13, 2021 · 10 comments · Fixed by #345
Closed

Spring Boot MVC: add Spring Boot Actuator #198

pascalgrimaud opened this issue Nov 13, 2021 · 10 comments · Fixed by #345

Comments

@pascalgrimaud
Copy link
Member

pascalgrimaud commented Nov 13, 2021

New API with this

@pascalgrimaud pascalgrimaud changed the title Generator: Spring Boot Actuator Spring Boot core: add Spring Boot Actuator Nov 20, 2021
@swarajsaaj
Copy link
Contributor

Should it be in "mvc" context instead? Do you feel any use of actuator without a web dependency?

@pascalgrimaud pascalgrimaud changed the title Spring Boot core: add Spring Boot Actuator Spring Boot MVC: add Spring Boot Actuator Dec 18, 2021
@pascalgrimaud
Copy link
Member Author

Indeed @swarajsaaj you're right, about putting this in MVC

But I don't think actuator should be added by default, so it should be optional, do you agree?

@swarajsaaj
Copy link
Contributor

@pascalgrimaud Yes I agree with a separate API for adding actuator in MVC resource with:-

  • Basic endpoints in application properties
  • Core health probes
  • Keep it under "/management" to match generator-jhipster path
  • And core metrics

@pascalgrimaud
Copy link
Member Author

sound perfect. Can I assign to you this ticket ?

@swarajsaaj
Copy link
Contributor

Yes please :)

@swarajsaaj
Copy link
Contributor

There is a conflict with springfox+actuator and spring.mvc.pathmatch.matching-strategy property already added at

springBootPropertiesService.addProperties(project, "spring.mvc.pathmatch.matching-strategy", "ant_path_matcher");
.

Spring actuator's path matching strategy cannot be configured to AntPathMatcher by properties.
Ref:- https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.6-Release-Notes#pathpattern-based-path-matching-strategy-for-spring-mvc

Are we already planning to replace springfox with springdoc in #219 ? Shall we remove this property in this ticket if we are not going to depend on springfox?

@pascalgrimaud
Copy link
Member Author

Oh I see: it's because I added springfox by default when adding Tomcat MVC or Undertow MVC.
I shouldn't do that:

  • so springfox should be removed from MVC
  • adding springdoc could be done separately, or maybe should be by default with MVC, I don't' know

@pascalgrimaud
Copy link
Member Author

We could remove first springfox in a 1st PR, then you can continue the work for this ticket separately. What do you think?

@swarajsaaj
Copy link
Contributor

Sure, Looks good 👍

@pascalgrimaud
Copy link
Member Author

@swarajsaaj : I'm doing the PR for removing springfox. I'll submit it in few minutes

swarajsaaj added a commit to swarajsaaj/jhipster-lite that referenced this issue Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants