Disabling JMX in a spring application

前端 未结 4 510
滥情空心
滥情空心 2021-02-05 13:19

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

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


        
4条回答
  •  北恋
    北恋 (楼主)
    2021-02-05 13:46

    You need to disable the setting in your application.properties file (it is automatically turned on if not set). Either edit or create this file: src/main/resources/config/application.properties

    That is for a maven project, so if not in maven, just put 'resources' at the same level as your java folder.

    You will just need this single line in the file (it can be blank otherwise):

    spring.jmx.enabled=false
    

    If you want to add other settings, here are all the options: http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html

提交回复
热议问题