【SpringBoot系列】static修饰的成员变量如何加载获取使用application.yml配置文件中的值
概要
@PostConstruct
类实例化过程
application.yml 自定义属性值
tencent:
cloud:
appId: xxxxxx #APPID
secretId: xxxxxx #密钥
secretKey: xxxxxx #密钥key
face:
groupId: xxxxxx #人员库ID
region: ap-shanghai #地域
静态配置类
package com.example.hospital.patient.wx.api.config;
import com.example.hospital.patient.wx.api.util.IaiUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import javax.annotation