前后端分离以及rest风格介绍在CSDN中一抓一大把我就不介绍了
(主要原因是小编也在学习当中。。。)
给大家提供两个链接:
进入正题,前后端分离,前台调接口需要通过接口文档才能知道具体调用哪个接口
为方便前台接口调用,后端通过配置swaggerui可以查看具体的接口路径,请求相应参数。
接下来说明后端配置步骤:
1.在pom文件中导入依赖
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.2.2</versi