異常Canonical names should be kebab-case ('-' separated), lower

異常Canonical names should be kebab-case ('-' separated), lowercase alpha-numeric characters and must start with a letterapi

Description:

Configuration property name 'projectUrl' is not valid:

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

Action:

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

Canonical names should be kebab-case ('-' separated), lowercase alpha-numeric characters and must start with a letterui

譯:規範名稱應爲kebab大小寫(「-」分隔),小寫字母數字字符,而且必須以字母開頭this

參考SpringBoot官方文檔url

Relaxed Binding

Spring Boot uses some relaxed rules for binding Environment properties to @ConfigurationProperties beans, so there does not need to be an exact match between the Environment property name and the bean property name. Common examples where this is useful include dash-separated environment properties (for example, context-path binds to contextPath), and capitalized environment properties (for example, PORT binds to port).

輕鬆綁定
Spring Boot使用一些寬鬆的規則將Environment屬性綁定到@ConfigurationProperties bean,所以不須要在Environment屬性名和bean屬性名之間進行精確匹配。 這有用的常見示例包括破折號分隔的環境屬性(例如,context-path綁定到contextPath)和大寫環境屬性(例如,PORT綁定到端口)。

projectUrl 應改成 project-urlcode

相關文章
相關標籤/搜索