# springboot-learn **Repository Path**: liangjianweiLJW/springboot-learn ## Basic Information - **Project Name**: springboot-learn - **Description**: springboot学习 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-08-30 - **Last Updated**: 2022-01-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # springboot 学习 ## 1. 增删查改 http请求: XxxController 前端控制器 -> XXXService业务接口类 -》XXXServiceImpl 业务接口实现类 -》XXXMapper持久化接口类 -》mybatis XML配置 ### controller相关 #### @RestController 声明一个控制器bean放到容器 @RestController=@ResponseBody + @Controller #### @ResponseBody 接口返回参数放到http数据包body上 #### @RequestBody @RequestBody主要用来接收前端传递给后端的json字符串中的数据的(请求体中的数据的) #### @RequestParm 获取url上的参数并映射到对象 #### @PathVariable 获取url路径的文字并映射到对象 #### @RequestMapping 路由声明注解,不指定类型,则生成有多个路由(get pot delete put) 指定具体类型: @RequestMapping(path = "/login", method=RequestMethod.GET) 相当于 @GetMapping("/login") #### xxxMapping 按照restful风格约定 1. @GetMapping 查询 2. @PostMapping 创建资源 3. @PutMapping 更新资源 4. @DeleteMapping 删除资源 5. @PatchMapping 部分更新 ### service相关 #### @Transactional 事务控制,有多个传播类型和隔离级别 #### 异常类 ### XML #### resulTtype和resulTMap ## 2. lombok使用 ## 3. mybatis-plus使用 ## 4. 依赖注入 ## 5. AOP ## 6. 集合类操作 ## ## 7. redis api ## 7. 增加登录权限 ## 并发编程