04 2017 档案
摘要:第一种是直接从session中手动拿: @RequestMapping(value = "/user", method = RequestMethod.GET)public ResponseEntity<Map<String, Object>> getUser(HttpSession httpSes
阅读全文
摘要:<head> <title>添加用户</title> <meta charset="utf-8" /> <meta name="_csrf" th:content="${_csrf.token}"/> <meta name="_csrf_header" th:content="${_csrf.hea
阅读全文
摘要:UserPojo UserService UserController 前台模板页
阅读全文
摘要:controller: /** * 分页查询用户 * @param request * @param response * @return * @throws Exception */ @RequestMapping(value="/queryList",method=RequestMethod.G
阅读全文
摘要:1、查询int 数组 dao类: public List<Integer> queryRoleIdList(Integer userId); service类: List<Integer> userIdList=userRoleService.queryRoleIdList(userId); <se
阅读全文
摘要:由于项目需要生成多条数据,并保存到数据库当中,在程序中封装了一个List集合对象,然后需要把该集合中的实体插入到数据库中,项目使用了Spring+MyBatis,所以打算使用MyBatis批量插入,应该要比循环插入的效果更好,由于之前没用过批量插入,在网上找了一些资料后最终实现了,把详细过程贴出来。
阅读全文
摘要:1、 lombok的jar包路径 wangfei@DESKTOP-8AT8HRO MINGW64 /d/gradle-3.4.1/caches/modules-2/files-2.1/org.projectlombok/lombok/1.16.16/245b50f714bf89ed7659266ac
阅读全文
摘要:安装STS后首先要做的修改默认编码: 1、windows--perferences--general--workspace,Text file encoding设置成utf-8 2、windows--perferences--general--content types,把里面text的defaul
阅读全文