![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
springmvc
_凡尘
make it possible
展开
-
使用HibernateValidator自定义校验器校验参数为指定值
1.自定义一个注解@EnumValue/** * 性别约束 */@Target({ ElementType.FIELD,ElementType.METHOD,ElementType.PARAMETER})@Retention(RetentionPolicy.RUNTIME)@Documented@Constraint(validatedBy = EnumValueValidator.class)public @interface EnumValue{ // 错误是的消息 Stri原创 2020-05-29 17:43:09 · 2486 阅读 · 1 评论 -
SpringMVC登录拦截器的简单实现
1.写一个拦截器,实现HandlerInterceptor接口/** * Created by Jujung * Date : 2019/9/23 19:40 * 登录拦截器 */public class LoginInterceptor implements HandlerInterceptor { /** * 处理进入handler之前的请求 * ...原创 2019-09-23 22:15:41 · 123 阅读 · 0 评论