程序出错:Configuration property name ‘xxx’ is not valid, Canonical names should be kebab-case (‘-‘ separated), lowercase alpha-numeric characters and must start with a letter。
1 2 3 4 5 6 7 8 9
Configuration property name 'cmsOss' is not valid:
Invalid characters: 'O' Bean: CMSImageController Reason: Canonical names should be kebab-case ('-' separated), lowercase alpha-numeric characters and must start with a letter
Action:
Modify 'cmsOss' so that it conforms to the canonical names requirements.
解决
原因是命名不规范,不要大写字母,使用小写字母,可加中划线-。
1 2 3 4 5 6 7 8 9 10 11 12
@Data @Component @ConfigurationProperties(prefix = "cmsOss") public class CMSOSSConfig { private String accessId;