SpringBoot 学习三:Controller的使用

1、给同一个类添加两个访问地址 在浏览器里输入: localhost:8081/hello 或者 localhost:8081/hi都能访问到。 2、给整个类指定一个URL  通过设置@RequestMapping("/hello"),给整个类指定一个URL  这个时候就需要通过http://localhost:8081/hello/hi去访问这个类了。 3、如何处理url中的参数 (1) 使用@
相关文章
相关标签/搜索