目录
  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. SpringBoot整合自定义FTP文件连接池

    说明:通过GenericObjectPool实现的FTP连接池,记录一下以供以后使用环境:JDK版本1.8框架 :springboot2.1文件服务器: Serv-U1.引入依赖 <!--ftp ...

  2. echarts - 折线图 - 每秒刷新数据并显示

    function randomData() { now = new Date(+now + oneDay); value = value + Math.random() * 21 - 10; var ...

  3. SpringBoot中使用Jackson将null值转化为""或者不返回的配置

    第一种方式:SpringBoot中使用Jackson将null值转化为"" 前言:在实际项目中难免会遇到null值的出现,但是我们转json时并不希望出现NULL值,而是将NULL ...

  4. docker更改默认存储路径

    systemctl stop docker mkdir /data/docker cp -r /var/lib/docker/* /data/docker mv /var/lib/docker /va ...

  5. Python input() 函数

    Python3.x 中 input() 函数接受一个标准输入数据,返回为 string 类型. Python2.x 中 input() 相等于 eval(raw_input(prompt)) ,用来获 ...

  6. 全面分析:APP中的消息功能设计

    一.定义 APP的“消息”模块,是通过APP或手机这个客户端,围绕某个产品的功能进行交流.沟通的重要方式.这种沟通,一方是运营人员或商家,也可以是产品或系统本身,为方便说明笔者这里姑且统一简称为B端, ...

  7. Unchecked runtime.lastError: The message port closed before a response was received.

    这是由于某个 Chrome 扩展程序造成的. 打开 chrome://extensions/,逐一关闭排查.我这边是由于“迅雷下载支持”这个扩展引起的,将其关闭即可.

  8. 使用CSS隐藏元素滚动条

    如何隐藏滚动条,同时仍然可以在任何元素上滚动? 首先,如果需要隐藏滚动条并在内容溢出时显示滚动条,只需要设置overflow:auto样式即可.想要完全隐藏滚动条只需设置overflow:hidden ...

  9. [技术博客]使用wx.downloadfile将图片下载到本地临时存储

    目录 目标 代码展示 重点讲解 目标 在上一篇技术博客中,我们生成的海报中包含图片,这些图片是存储到服务器上的,而canvas的drawimage函数只能读取本地文件,因此我们在drawCanvas之 ...

  10. Sourcetree 集成 Azure DevOps Server(Git)

    概述- SourceTree 是 Windows 和Mac OS X 下免费的 Git 和 Hg 客户端管理工具,同时也是Mercurial和Subversion版本控制系统工具.支持创建.克隆.提交 ...