Java-Spring LiveBeansView报错相关
Spring 启动后报这个错:
javax.naming.NameNotFoundException: Name [spring.liveBeansView.mbeanDomain] is not bound in this Context. Unable to find [spring.liveBeansView.mbeanDomain].
想问一下,这个liveBeansView该如何配置?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我也遇到这个问题了。
怎么都注入不来..而另外一个项目是正确的,搞了一个下午了..
控制台报错信息:
[26/08/13 04:47:07:007 CST] DEBUG jndi.JndiPropertySource: JNDI lookup for name [spring.liveBeansView.mbeanDomain] threw NamingException with message: null. Returning null.
[26/08/13 04:47:07:007 CST] DEBUG env.PropertySourcesPropertyResolver: Searching for key 'spring.liveBeansView.mbeanDomain' in [systemProperties]
[26/08/13 04:47:07:007 CST] DEBUG env.PropertySourcesPropertyResolver: Searching for key 'spring.liveBeansView.mbeanDomain' in [systemEnvironment]
[26/08/13 04:47:07:007 CST] DEBUG env.SystemEnvironmentPropertySource: PropertySource [systemEnvironment] does not contain 'spring.liveBeansView.mbeanDomain'
[26/08/13 04:47:07:007 CST] DEBUG env.SystemEnvironmentPropertySource: PropertySource [systemEnvironment] does not contain 'spring_liveBeansView_mbeanDomain'
[26/08/13 04:47:07:007 CST] DEBUG env.SystemEnvironmentPropertySource: PropertySource [systemEnvironment] does not contain 'SPRING.LIVEBEANSVIEW.MBEANDOMAIN'
[26/08/13 04:47:07:007 CST] DEBUG env.SystemEnvironmentPropertySource: PropertySource [systemEnvironment] does not contain 'SPRING_LIVEBEANSVIEW_MBEANDOMAIN'
[26/08/13 04:47:07:007 CST] DEBUG env.PropertySourcesPropertyResolver: Searching for key 'spring.liveBeansView.mbeanDomain' in [class path resource [conf/test.properties]]
[26/08/13 04:47:07:007 CST] DEBUG env.PropertySourcesPropertyResolver: Searching for key 'spring.liveBeansView.mbeanDomain' in [class path resource [conf/appconfig.properties]]
[26/08/13 04:47:07:007 CST] DEBUG env.PropertySourcesPropertyResolver: Could not find key 'spring.liveBeansView.mbeanDomain' in any property source. Returning [null]
@Configuration
@PropertySource("classpath:/conf/appconfig.properties")
public class AppConfig {
// 集付通卡接口
@Value("${cnnct_Interface_URL}")
String cnnctInterfaceURL;
@Value("${cnnct_ic_suffix}")
String ICSuffix;
@Value("${jft_door_site_URL}")
String jftDoorSiteURL;
@Value("${jft_ds_suffix}")
String jftDSSuffix;
appconfig.properties
##
cnnct_Interface_URL=http://localhost:8090/cnnctInterfaceCenter
cnnct_ic_suffix=.json
jft_door_site_URL=
jft_ds_suffix=