开发中遇到的问题

1.nginx默认会将header中参数的下划线去掉。

解决方案:1:使用驼峰形式或者其它符号来替换掉“_”.

     2:在nginx的nginx.conf配置文件中配置http的部分添加:underscores_in_headers on;(默认值是off)

 

 

2.使用stream.reduce()来拼接一个字符串,关于reduce()的使用讲解如下:

https://www.jianshu.com/p/3b0fbcc9f24d

 

3.Spring Boot @PathVariable出现点号"."时导致路径参数截断获取不全

 

 

当调用地址为:/mongo/com.baby.model.dto.PieChartOfRefundFeeBillDTO时,后端接收到的className参数的值为com.baby.model.dto,缺失了最后一个小数点后的值

 

解决方案:

 

  1.修改url,在地址栏参数后面添加一个静态的uri,如:

 

     

 

  2.@RequestMapping的value中使用SpEL来表示,value中的{className}换成{className:.+}

    

 

posted on 2020-09-21 16:39  永不宕机  阅读(111)  评论(0编辑  收藏  举报

导航