手动获取bean
(62条消息) SpringBoot手动获取Bean_奚学长又装死的博客-CSDN博客_springboot 手动获取bean
手动获取配置文件中的数据
// SpringUtil 是自己写的工具包,代码见上面的 手动获取bean
Environment environment = SpringUtil.getBean("environment");
String appId = environment.getProperty("wx.info.appId");
(62条消息) SpringBoot手动获取Bean_奚学长又装死的博客-CSDN博客_springboot 手动获取bean
// SpringUtil 是自己写的工具包,代码见上面的 手动获取bean
Environment environment = SpringUtil.getBean("environment");
String appId = environment.getProperty("wx.info.appId");