zoukankan      html  css  js  c++  java
  • SpringMVC的常用操作汇总

    基本操作

    #类级别的注解

           @Controller

           @RestController

           @RequestMapping("/hello")

    #springMVC常用方法级别注解

           @ResponseBody

           @GetMapping()

           @GetMapping("/treeData")

           @GetMapping("/add/{parentId}")

           @GetMapping(value = { "/selectDeptTree/{deptId}", "/selectDeptTree/{deptId}/{excludeId}" })

          

           @PostMapping("/list")

           @PostMapping("/checkRoleKeyUnique")

          

           @DeleteMapping("/{userId}")

          

           @PutMapping("/update")

    参数级别的

           @PathVariable("deptId") Long deptId

           @PathVariable(value = "excludeId", required = false) Long excludeId

           @PathVariable(value = "excludeId", required = false) String excludeId

          

           @Validated

          

           @Validated在controller层打在形参上,开启了jr303校验,校验字段在实体类字段

           视图在解析参数时会执行校验

    中级操作 

      get请求,携带的参数是数组的情况

         

     

    高级一点的

     

  • 相关阅读:
    pandas中的时间序列基础
    Python中的进程
    Pandas透视表和交叉表
    Pandas分组级运算和转换
    Python中的线程详解
    Pandas聚合
    Python面试题整理
    Pandas分组
    暑假集训 || 动态规划
    DFS || HDU 2181
  • 原文地址:https://www.cnblogs.com/daydayhave/p/14319283.html
Copyright © 2011-2022 走看看