![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring系列
简单学习spring
李大虾101
天行健,君子以自强不息
展开
-
HttpSessionListener中RequestContextHolder.getRequestAttributes() 为null
解决:继承ServletRequestListener 接口,实现requestublic class MyHttpSessionListener implements HttpSessionListener,ServletRequestListener { private HttpServletRequest request; @Override public void requestInitialized(ServletRequestEvent event) {原创 2021-09-27 16:51:19 · 356 阅读 · 0 评论 -
请求参数校验 hibernate validate,自定义实现多字段关联
自定义注解用于类上@Retention(RetentionPolicy.RUNTIME)// 用于类@Target(ElementType.TYPE)@Documented@Constraint(validatedBy = SdkPtzValAnno.class)public @interface SdkPtzVal { String message() default "Please check whether the request parameters are legal";.原创 2021-02-18 17:08:06 · 942 阅读 · 1 评论 -
Springcloud的配置文件bootstrap与application的思考
加载顺序bootstrap(.yml 或者 properties) 由父ApplicationContext加载,比application(.yml 或者 properties)优先加载bootstrap(.yml 或者 properties) 里面的属性不能被覆盖原理Spring是有上下文一说的,也叫Application Context,Application Context又是有...原创 2020-01-20 11:41:25 · 667 阅读 · 3 评论