javaspringjmx

Disabling JMX in a spring application


I'm trying to disable jmx so that i don't get:

org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'mbeanExporter'anymore. 

I've found a partial answer saying that I should include this in the application.properties file:

So I created the file with that one line. But how do I make sure that Spring acutally reads it? Do I need to edit something in spring.xml? If so, where?


Solution

  • Are you using spring boot? If so you just need to place the file in src\main\resources\application.properties by default

    You can check sample projects here https://github.com/spring-projects/spring-boot/tree/master/spring-boot-samples