摘要: ##修改密码功能 需要用户提交原始密码和新密码,在根据当前登录的用户进行信息的修改操作 ###1.持久层 ####1.1 规划需要执行的sql语句 根据用户的uid修改password值 update t_user set password = ?,modeified_user= ?,modeifi 阅读全文
posted @ 2022-11-03 17:38 wiselee/ 阅读(269) 评论(0) 推荐(0)
摘要: HandlerInterceptor接口给我们提供了3个方法: (1)preHandle: 在执行controller处理之前执行,返回值为boolean ,返回值为true时接着执行postHandle和afterCompletion,如果我们返回false则中断执行 (2)postHandle: 阅读全文
posted @ 2022-11-03 15:52 wiselee/ 阅读(184) 评论(0) 推荐(0)
摘要: 拦截器 在Spring MVC中拦截请求是通过处理器拦截器HandlerInterceptor来实现的,它拦截的目标是请求的地址。在Spring MVC中定义一个拦截器,需要实现HandlerInterceptor接口。 1 HandlerInterceptor 1.1 preHandle()方法 阅读全文
posted @ 2022-11-03 15:49 wiselee/ 阅读(405) 评论(0) 推荐(0)
摘要: ###登录端的业务层 ####1.产生什么异常 1.用户名对应的密码错误,密码匹配失败 PasswordNotMatchException 2.用户名没被找到 UsernameNotFoundException 3.异常的编写: 继承ServiceException基类 使用alt+ insert 阅读全文
posted @ 2022-11-03 13:51 wiselee/ 阅读(537) 评论(0) 推荐(0)