【Spring Cloud】异常记录

【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 对配置格式进行了强制要求。

posted @   翠微  阅读(322)  评论(0编辑  收藏  举报
(评论功能已被禁用)
编辑推荐:
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
点击右上角即可分享
微信分享提示