将字典数据,配置在 yml 文件中,通过加载yml将数据加载到 Map中 Spring Boot 中 yml 配置、引用其它 yml 中的配置。# 在配置文件目录(如:resources)下新建application-xxx 必须以application开头的yml文件, 多个文件用 "," 号分隔,不能换行 项目结构文件 application.yml server: port: 8088 application: name: VipSoft Env Demo spring: profiles: include: dic # 在配置文件目录(如:resources)下新建application-xxx 开头的yml文件, 多个文件用 "," 号分隔,不能换行 #性别字典 user-gender: 0: 未知 1: 男 2: 女 application-dic.yml 将字典独立到单独的yml文件中 #支付方式 pay-type: 1: 微信支付 2: 货到付款 在 resources 目录下,创建META-INF目录,创建 spring.factories文件, Spring...