通过在浏览器访问controller中方法对应的路径 只能测试get请求对应的方法 @GetMpping 而其他的post put delete不能测试
使用swagger
swagger生成在线接口文档 方便测试
- 在父工程guli_parent 右键new-module创建一个子模块maven工程 common
- 在common的pom.xml文件中引入依赖
<packaging>pom</packaging>
<dependencies>
<!--swagger-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<scope>provided </scope>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<scope>provided </scope