
我以springboot项目中实现logoutHander的类loginoutHandler为例:
@Autowired
private User userMapper;
@override
public void logout(HttpServletRequest request,HttpServletResponse response,Authentication authentication){
WebApplicationContext applicationContext=Web ApplicationContextUtils.getWebApplicationContext(request.getServletContext());
userMapper=(UserMapper)applicationContext.getBean(“userMapper”);
}
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)