map-underscore-to-camel-case: true
开启驼峰命名
@GetMapping("/userInfo")public Result<Users> userInfo(@RequestHeader(name = "Authorization") String token,HttpServletResponse response) {Map<String, Object> map = JwtUtil.parseToken(token);
// System.out.println(","+map.get("user")+"."+map.get("user"));String username =(String) map.get("username");Users u = usersService.findByUserName(username);return Result.success(u);}
threadlocal
相当于全局变量
//全局变量 全局共享变量
public class ThreadLocalUtils {private static ThreadLocal THREAD_LOCAL = new ThreadLocal();
// 根据键值对取值public static <T> T get() {return (T)THREAD_LOCAL.get();}
// 存储键值对public static void set(Object o) {THREAD_LOCAL.set(o);}
// 清除 防止内存泄露public static void remove() {THREAD_LOCAL.remove();}
}
线程安全的
// 根据用户名查询@Select("select * from users where username=#{username}")Users findByUserName(String username);// 添加注册
// @Insert("inse