问题描述:命名不规范
Canonical names should be kebab-case (’-’ separated), lowercase alpha-numeric characters and must start with a letter
规范名称应为(’-'分隔)-n=N、小写字母数字字符,并且必须以字母开头
Configuration property name 'cmsOss' is not valid:
Invalid characters: 'P'
Bean: CMSImageController
Reason: Canonical names should be kebab-case ('-' separated), lowercase alpha-numeric characters and must start with a letter
Action:
Modify 'Person' so that it conforms to the canonical names requirements.
解决方法:
@ConfigurationProperties(prefix = "Person")
public class Person {
private String lastName;
private String age;
private Boolean boss;
private Date birth;
private Map<String ,Object>maps;
private List<Object>lists;
private Dog dog;
}
将Person改为person
本文讨论了配置属性命名的规范问题,强调了规范名称应为‘-’分隔的小写字母数字字符,并且必须以字母开头。针对不符合规范的示例'cmsOss',详细解释了错误原因并提供了修改后的正确示例。
397

被折叠的 条评论
为什么被折叠?



