yml 键值的大小写约束与自定义内容提示 porm.xml 配置

yml键值大小写约束及配置提示

 idea 礼貌的报错了

当前的配置文件信息

# Aliyun OSS 配置
  Aliyun:
    OSS:
      endpoint: https://oss-cn-beijing.aliyuncs.com
      bucketName: javawebdev
      region: cn-beijing

以及

// AliyunOSSProperties.class

@Data
@Component
@ConfigurationProperties(prefix = "Aliyun.OSS")
public class AliyunOSSProperties {

    private String endpoint;
    private String bucketName;
    private String region;

}

修改了 Aliyun 之后,运行依旧报错,提示

***************************
APPLICATION FAILED TO START
***************************

Description:

Configuration property name 'aliyun.OSS' is not valid:

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

Action:

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

需要修改 OSS 。

yml and yaml 文件的标签 不允许大写。小写与“-”分割,是正确的做法。

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

配置自定义内容的提示

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
        </dependency>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值