Configuration property name ‘testConfig‘ is not valid:

SpringBoot项目启动时报此错误

Description:

Configuration property name 'testConfig' is not valid:

    Invalid characters: 'C'
    Bean: AController
    Reason: Canonical names should be kebab-case ('-' separated), lowercase alpha-numeric characters and must start with a letter

Action:

Modify 'testConfig' so that it conforms to the canonical names requirements.


Process finished with exit code 0

经检查后发现,将yaml的大写换成小写就好了
原来:

server:
  port: 8888

testConfig:
  id: 1
  name: aaa

改完之后

server:
  port: 8888

testconfig:
  id: 1
  name: aaa
posted @ 2022-03-07 18:04  叕叕666  阅读(113)  评论(0)    收藏  举报