![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
springboot
ErHao.Class
Less coding, more thinking
展开
-
RestTemplate 添加Gzip支持
RestTemplate 添加Gzip支持使用restTemplate访问接口抛出异常Caused by: org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Illegal character ((CTRL-CHAR, code 31)): only regular white space (\r, \n, \t) is allowed between tokens; nested原创 2021-04-26 11:49:24 · 1784 阅读 · 0 评论 -
RestTemplate添加日志打印拦截器
RestTemplate添加日志打印拦截器添加RestTemplate Bean配置添加RestTemplate Bean配置 @Bean public RestTemplate restTemplate() { RestTemplate restTemplate = new RestTemplate(); //将RequestFactory换成BufferingClientHttpRequestFactory方便从流中获取调用结果 restTem原创 2021-04-08 11:31:07 · 1468 阅读 · 0 评论 -
springboot 引入第三方jar包中过滤器配置
在SSM框架中bean的配置是放在xml中的,springboot项目通过@bean在config配置类中将过滤器注入进去。代码如下 @Bean public FilterRegistrationBean cas20ProxyReceivingTicketValidationFilter() { FilterRegistrationBean filterRegi...原创 2019-06-21 09:54:36 · 5144 阅读 · 1 评论