spring-boot-starter-parent 2.1.14.RELEASE
1.配置文件:
test:
nodeId:
测试: 测试
test: test
2.实体类接收:
@Data
@ConfigurationProperties(prefix = "test")
@Component
public class TestConfig {
private Map<String, String> nodeId;
}
结果 :
配置文件中key为中文时接收不到数据
在springboot1.5 版本的时候这样写都是可以接收到数据的