【Spring Cloud】异常记录

============================================================

1、feigin status 400 reading 请求头长度不够

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

============================================================

1、feigin status 400 reading 请求头长度不够

指定长度为10M

server:
  max-http-header-size: 10485760

 

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

user-config:
  contact-address: beijing
@Configuration
@ConfigurationProperties(prefix = "user-config")
public class UserConfig {
    String contactAddress;
}

@ConfigurationProperties 必须使用 kebab-case 短横线,不能使用驼峰,配置中的属性 contact-address 测试发现 kebab-case 和 驼峰都可以,但是建议使用 kebab-case 因为 spring boot 2.x 对配置格式进行了强制要求。

相关文章:

  • 2021-05-26
  • 2021-08-25
  • 2021-06-05
  • 2021-11-04
  • 2022-01-17
  • 2021-09-08
  • 2021-10-02
  • 2022-02-26
猜你喜欢
  • 2021-12-24
  • 2022-12-23
  • 2021-08-21
  • 2022-12-23
  • 2021-08-03
  • 2021-08-12
  • 2021-09-24
相关资源
相似解决方案