1.
@RestController
@RestController ≈ @Controller + @ResponseBody
在Controller文件 public class xxxx 前面加
用于返回
2.
@RequestMapping(value =  "/hello",method = RequestMethod.GET)
@RequestMapping  用于设置访问的方法  使用GET还是POST等

3.
返回直接用return

4.
@Value("${cupSize}")
private String cupSize;

@Value调用配置文件
配置文件可以不用写数据类型,在调用出来后用private设置数据类型为String或者Int

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-25
  • 2022-12-23
  • 2022-12-23
  • 2021-07-10
猜你喜欢
  • 2021-06-28
  • 2022-12-23
  • 2021-06-16
  • 2021-06-21
  • 2021-07-14
相关资源
相似解决方案