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?