![](https://img-blog.csdnimg.cn/2020120513174390.jpg?x-oss-process=image/resize,m_fixed,h_224,w_224)
springboot
文章平均质量分 65
springboot 相关
夜行者2045
日常工作笔记,欢迎来踩,有哪里不对,欢迎提出宝贵意见
展开
-
Spring/SpringBoot 过滤器修改、获取http 请求request中的参数 和 response返回值,比如修改请求体和响应体的字符编码
通过自定义filter,RequestWrapper,ResponseWrapper 处理请求和响应数据,比如修改请求体和响应体的字符编码1.request 和 response 中的数据都是 存在流中的(缓存中)获取一次就没有了,需要重新写回去。所以需要两个包装类分别继承HttpServletRequestWrapper 和 HttpServletResponseWrapper 对 request和response进行包装,从中获取数据。自定义Filter,主要重写doFilter方法,在doFilt原创 2022-11-27 17:12:54 · 5938 阅读 · 0 评论 -
springboot项目,com.alibaba.druid.pool.DruidDataSource : {dataSource-0} closing错误原因
数据源连接配置,config目录下多出来一个其他配置文件导致的,将其删除或者@configuration注解注释掉即可,是其他配置文件中的值不是static类型导致的!目前不知道原理原创 2020-07-08 10:50:01 · 8820 阅读 · 0 评论 -
resttemplate
原创 2020-06-05 10:55:59 · 117 阅读 · 0 评论 -
springboot+dubbo 服务启动失败,没有抛异常,求大神!!!
启动日志如下:不知道什么原因com.alibaba.dubbo.config.spring.beans.factory.annotation.ServiceAnnotationBeanPostProcessor.resolveBeanNameGenerator(ServiceAnnotationBeanPostProcessor.java:167) 2020-02-20 21:21:53 [I...原创 2020-02-20 22:53:59 · 912 阅读 · 1 评论 -
springboot @Transactional 在controller中无效的问题,未解决
参考文章:https://blog.csdn.net/fubaojiexing/article/details/79057639https://blog.csdn.net/Dongguabai/article/details/80788585https://www.jianshu.com/p/00758c77bf60https://note.youdao.com/ynoteshare1/i...原创 2019-11-13 10:58:45 · 2305 阅读 · 1 评论 -
springboot、spring 根据上下文获取bean 代理对象
启动类注解:// @EnableAspectJAutoProxy(exposeProxy = true)//基于 AopContext 暴露代理对象获取代理对象:// @Autowired// public static JestClient jestClientProxy=(JestClient) AopContext.currentProxy();// new Jes...原创 2019-09-25 16:06:44 · 2437 阅读 · 0 评论