目录
  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. Eclipse调用Tomcat出错

    错误提示:The server cannot be started because one or more of the ports are invalid. Open the server edit ...

  2. load address、entry point、 bootm address以及kernel运行地址

    load address:加载地址   load_addr      mkimage -a entry point: 入口地址     entry_point     mkimage -e bootm ...

  3. 《Exception团队》第三次作业:团队项目的原型设计

    一.项目基本介绍 项目 内容 这个作业属于哪个课程 任课教师博客主页链接 这个作业的要求在哪里 作业链接地址 团队名称 Exception 作业学习目标 学习原型设计过程以及工具的使用 二.原型设计细 ...

  4. 01-C#笔记-hello_world

    /* * 主文件是 xxx.cs * 基本的 hello world 程序如下: */ using System; using System.Collections.Generic; using Sy ...

  5. pycharm调试添加命令行参数

    UI界面: Run->Edit Configurations->Parames

  6. 【BZOJ3711】Druzyny

    [BZOJ3711]Druzyny 题面 bzoj 题解 首先我们有一个\(O(n^2)\)的\(dp\): 设\(f_i\)表示现在已经分好了\(1...i\)的组,且\(i\)作为一组的结尾的最大 ...

  7. oracle用dba创建用户并授权

    参考: https://blog.csdn.net/zhang195617/article/details/5857769 sqlplus中切换用户,如切换到adm用户,命令为:conn adm/12 ...

  8. javaWeb项目配置自定义404错误页

        1.情景展示 为了隐藏tomcat版本信息以及显示更友好的错误信息提示,如何将404的错误跳转到指定页面? 2.解决方案 第一步:修改项目的web.xml 将如下代码添加到</web-a ...

  9. Android Studio 之 ROM【1】, Entity,Dao,Database

    Android Studio 之 ROM, Entity,DAO,DataBase 1.Entity 实体类 package com.example.roombasic; import android ...

  10. 亿级Web系统搭建 Web负载均衡的几种实现方式(阿里)

    我还写了两篇详细的 参考:六大Web负载均衡原理与实现 参考:LVS(Linus Virtual Server):三种IP负载均衡方式比较+另三种Web负载均衡方式 其中LVS.HAProxy可以工作 ...