3.4 配置类

# 配置类 在使用注解ConfigurationProperties进行映射时,需要使用注解Component将此类加入到组件中。prefix = "sms" sms 代表的是配置文件中的前缀 ``` @Component @ConfigurationProperties(prefix = "sms") @Data public class SmsConfigurationEntity { // 阿里accessKeyId private String accessKeyId; // 阿里accessSecret private String accessSecret; // 短信API产品域名(接口地址固定,无需修改) private String domain; // 阿里云控制台签名 private String signName; // 是否可用 private boolean enable; // regionId 区域id private String regionId; // 系统规定参数 private String action; // 版本信息 已经固定 不能进行更改 private String version; // 验证码位数默认为4 private Integer randCode; } ```