![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JavaWeb
AKA石头
把握时间,掌握方向
展开
-
SpringBoot 通过反射获取Service
我们在开发 SpringBoot 项目时,当对象不是通过 @Autowird 常用的 MVC 三层架构依赖注入进来时,在使用的时候会报NPE异常。原创 2022-10-20 17:37:35 · 1584 阅读 · 0 评论 -
获取token的两种方法
1.通过Cookieprivate String getUserCookieToken(HttpServletRequest request) { Cookie[] cookies = request.getCookies(); if (cookies == null || cookies.length == 0) { return null; } for (Cookie cookie : cookies) {原创 2020-10-16 17:44:51 · 38107 阅读 · 4 评论