让Spring boot的@Value支持static属性的注入
不废话,直接上代码,实测有效
@Component
public class StaticValueSupport {
@Autowired
public void init(ApplicationContext context) throws IllegalAccessException {
AutowiredAnnotationBeanPostProcessor factor...
原创
2019-12-30 09:27:59 ·
101 阅读 ·
1 评论