在Spring应用程序中禁用JMX [英] Disabling JMX in a spring application

查看:174
本文介绍了在Spring应用程序中禁用JMX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正尝试禁用jmx,以使我不明白:

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

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

我找到了部分答案,说我应该将此内容包括在application.properties文件中:

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

  • spring.datasource.jmx-enabled=false

所以我用那一行创建了文件.但是,如何确保Spring能够正常读取?我需要在spring.xml中进行编辑吗?如果是这样,在哪里?

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?

推荐答案

您是否正在使用Spring Boot?如果是这样,您只需要默认将文件放在src \ main \ resources \ application.properties

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

您可以在此处 https://查看项目. github.com/spring-projects/spring-boot/tree/master/spring-boot-samples

这篇关于在Spring应用程序中禁用JMX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆