1

I have been developing a web app using spring boot, java 8, tomcat 8.5 among other things. I have a bunch of Rest Controllers and everything was working well till I integrated with JavaMelody. I followed the official JavaMelody guide focused to Spring Boot (https://github.com/javamelody/javamelody/wiki/UserGuideAdvanced#spring-boot-app).

JavaMelody is now working, as I can access /monitoring without any problem, but in the rest of the web app I receive a 404 Not Found for every Rest Api call.

I´ve been searching but I did not find any help in relation with this as it seems that the most common problem is a 404 on /monitoring which I have working well.

Thanks in advance.

EDIT If I delete JavaMelodyConfiguration.java everything starts working again.

EDIT 2 I realized that if I remove @PreAuthorize annotations (Spring Security) from the rest controllers, services work, so it looks like the problem comes with using Spring Security and JavaMelody. Any tip on configuring both of them?

javi_swift
  • 377
  • 6
  • 16
  • you added `JavaMelodyConfiguration` class in your app? Do you have any more info which can help to understand the problem? – Patrick Sep 15 '16 at 09:04
  • @Patrick Yes, I added JavaMelodyConfiguration class by default. I use Spring security and Swagger (this does not work now too), I dont know if there is some incompatibility between jMelody and any other library. – javi_swift Sep 15 '16 at 09:25
  • Does it work with Spring Boot 2? – Justinas Jakavonis Aug 08 '18 at 08:02

1 Answers1

0

Updated to Spring Boot 1.4.1 and now it is working.

javi_swift
  • 377
  • 6
  • 16