spring热加载(隔一段时间加载properties等文件)ReloadableResourceBundleMessageSource

1.先配置application context(地址有两种classpath:,file:)

 


	 
	
		classpath:properties/flex
		
      
      
      
  

 

 

 

 

2.java里面调用

 

@autowired
private ReloadableResourceBundleMessageSource messageSource;
String m = ctx.getMessage(key,new Object[0], "defaultValue", null);

 

 

 

 

 

 

你可能感兴趣的:(spring)