Caused by: org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name ‘fairPortProperties’: Could not bind properties to ‘airPortProperties’ : prefix=configuration.airPort.properties, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.source.InvalidConfigurationPropertyNameException: Configuration property name ‘configuration.airPortproperties’ is not valid
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.bind
我的springboot 版本 2.1.0
查看文档后了解到
springboot1.5以下版本貌似不存在这种问题
@ConfigurationProperties(prefix = “fairport”)
注解读取application.yml文件中的系统参数时,不能有大写字母改为“fairPort”即可,不能有驼峰命名。只能小写。