Blogger Information
Blog 87
fans 1
comment 0
visits 59140
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
springBoot 入门学习(2)
阿杰
Original
230 people have browsed it

Web入门

  • (1)控制器

  1. @GetMapping("/user")
  2. public String user(ModelMap map){
  3. map.addAttribute("name","zhang");
  4. return "user";
  5. }
  1. <body>
  2. <h1 th:text="'welcome:'+${name}"></h1>
  3. </body>

路由映射

  1. @RequestMapping(
  2. value = {"/user","/user2"},
  3. method = RequestMethod.GET
  4. )
  5. public String user(){
  6. return "user";
  7. }

参数传递

数据响应

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post