目录
  1. 问题
  2. 解决

问题

程序出错: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;
 
private String accessKey;
 
private String endpoint;
 
private String bucket;
}

将cmsOss改成cms-oss, 对应配置文件也做相应调整即可。

 
 https://blog.gelu.me/2018/Configuration-property-name-%27xxx%27-is-not-valid/

Configuration property name 'xxx' is not valid的更多相关文章

  1. Does not contain a valid host:port authority: Master:8031 (configuration property 'yarn.resourcemanager.resource-tracker.address')

    问题解决: 这个错误是:yarn里面的配置的格式有错误:如: <property> <name>yarn.resourcemanager.address</name> ...

  2. There is no getter for property named xxx' in 'class java.lang.xxx'

    在xxxMapper.xml我们使用sql片段来提高sql代码的复用性,当时新手传入参数时常常出现这样的错误: There is no getter for property named xxx' i ...

  3. You must configure either the server or JDBC driver (via the serverTimezone configuration property

    使用JDBC连接MySql时出现:The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one ...

  4. Mybatis异常There is no getter for property named 'XXX' in 'class java.lang.String'

    1.当入参为 string类型时 (包括java.lang.String.)  我们使用#{xxx}引入参数.会抛异常There is no getter for property named 'XX ...

  5. Mybatis中传参包There is no getter for property named 'XXX' in 'class java.lang.String'

    Mybatis中传参包There is no getter for property named 'XXX' in 'class java.lang.String' 一.发现问题 <select ...

  6. SpringBoot2.x升级踩坑--新增Configuration property name限制

    最近公司项目在做SpringBoot的升级,在升级过程中遇到了一些问题,简单记录一下,做个分享.另外,本文中的程序只为示例代码,并非公司生产环境代码. 遇到什么问题 从SpringBoot1.x升级到 ...

  7. @property与@xxx.setter的用法

    类中@property与@xxx.setter的方法介绍. 简单说,@property就是将定义的函数(方法)当作属性对象使用,不需要像调用函数那样去调用,而@xxx.setter是为@xxx的这样函 ...

  8. The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use

    java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized or represents more tha ...

  9. oracle: jdbcTypeForNull configuration property. Cause: java.sql.SQLException: 无效的列类型: 1111

    https://www.cnblogs.com/mmlw/p/5808072.html org.mybatis.spring.MyBatisSystemException: nested except ...

随机推荐

  1. Python实现感知器的逻辑电路(与门、与非门、或门、异或门)

    在神经网络入门回顾(感知器.多层感知器)中整理了关于感知器和多层感知器的理论,这里实现关于与门.与非门.或门.异或门的代码,以便对感知器有更好的感觉. 此外,我们使用 pytest 框架进行测试. p ...

  2. UiPath: Send SMTP Mail Message 发送带附件的邮件

    Tips:关于Hotmail的server和port的获取方式,请参考以下链接 https://support.office.com/en-us/article/Server-settings-you ...

  3. idea安装、配置及基本使用

    下载 下载地址:https://www.jetbrains.com/idea/download/#section=windows Ultimate为旗舰版,功能全面,插件丰富,按年收费. Commun ...

  4. turtle模块

    turtle(海龟)绘图用法 import turtle -->调出turtle库 setup()-->设置窗体大小和位置 turtle.setup(width,height,startx ...

  5. ajax中responseText与responseXML区别

    1."responseText”属性以字符串形式返回HTTP响应:“responseXML”属性以XML形式返回HTTP响应.function getTel() {  var telText ...

  6. VIJOS-P1066 弱弱的战壕

    JDOJ 1247: VIJOS-P1066 弱弱的战壕 题目传送门 Description 永恒和mx正在玩一个即时战略游戏,名字嘛~~~~~~恕本人记性不好,忘了--b. mx在他的基地附近建立了 ...

  7. POJ1463-Strategic game-(树形dp)

    http://poj.org/problem?id=1463 题意:有一棵n个结点的树,要在这棵树上放士兵守卫,一个士兵可以守卫自己所在的位置以及与之相邻的点.问最少放多少个士兵? 题解:对于每个点, ...

  8. python基础之一:input、if、while

  9. 分享:手把手教你如何免费且光荣地使用正版IntelliJ IDEA

    https://mp.weixin.qq.com/s/6nRYmn6gAWFLg3mUIN_ojg TIPS 近日在个人技术讨论QQ群里,谈论到IDEA的那些事儿.有童鞋居然在某电商网站花钱买激活码. ...

  10. Fish eating fruit 沈阳网络赛(树形dp)

    Fish eating fruit \[ Time Limit: 1000 ms \quad Memory Limit: 262144 kB \] 题意 大体的题意就是给出一棵树,求每一对点之间的距离 ...