22 07 2021

问题

Description:

Configuration property name ‘spring.shardingsphere.datasource.ds_0’ is not valid:

  1. Invalid characters: '_'
  2. Bean: org.apache.shardingsphere.shardingjdbc.orchestration.spring.boot.OrchestrationSpringBootConfiguration
  3. Reason: Canonical names should be kebab-case ('-' separated), lowercase alpha-numeric characters and must start with a letter

Action:

Modify ‘spring.shardingsphere.datasource.ds_0’ so that it conforms to the canonical names requirements.

原因

https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.external-config.typesafe-configuration-properties.relaxed-binding

解决

使用合适的命名~

延伸阅读
  1. Spring Boot 2.X(三):使用 Spring MVC + MyBatis + Thymeleaf 开发 web 应用
  2. Spring Boot 2.X(十八):集成 Spring Security-登录认证和权限控制
  3. Spring Boot 2.X(十一):全局异常处理
  4. Spring Boot 2.X(六):Spring Boot 集成 Redis
  5. Spring Boot 2.X(一):入门篇
发表评论