Spring boot
lipz_2011
这个作者很懒,什么都没留下…
展开
-
让Spring boot的@Value支持static属性的注入
不废话,直接上代码,实测有效@Componentpublic class StaticValueSupport { @Autowired public void init(ApplicationContext context) throws IllegalAccessException { AutowiredAnnotationBeanPostProcessor factor...原创 2019-12-30 09:27:59 · 101 阅读 · 1 评论 -
Spring boot 动态更新Environment
public FeignConfiguration(ResourceLoader resourceLoader, EnvironmentManager envManager,ApplicationContext context) throws IOException { DefaultPropertySourceFactory factory = new DefaultProperty...原创 2019-11-12 17:51:32 · 1420 阅读 · 0 评论