@Data @Configuration
//读取文件中的数据 @PropertySource("classpath:aliyun.properties")
//将文件中的数据赋值给实体类中的属性 @ConfigurationProperties(prefix = "aliyun.sms") public class AliyunSMSConfig { private String regionId; private String accessKeyId; private String accessKeySecret; private String domain; private String signName; private String templateCode; }
标签:实体类,String,读取,private,properties,赋值 From: https://www.cnblogs.com/learning0record/p/17130842.html