packagecom.ams.common.swagger.config;importio.swagger.annotations.ApiOperation;importlombok.extern.slf4j.Slf4j;importorg.springframework.beans.factory.annotation.Autowired;importorg.springframework.boot.autoconfigure.condition.ConditionalOnProperty;importorg.springframework.context.annotation.Bean;importorg.springfr...
1.1 SwaggerConfig配置类 packagecom.ams.common.swagger.config;importio.swagger.annotations.ApiOperation;importlombok.extern.slf4j.Slf4j;importorg.springframework.beans.factory.annotation.Autowired;importorg.springframework.boot.autoconfigure.condition.ConditionalOnProperty;importorg.springframework.context.annotation...
步骤一: 引入依赖 <!-- swagger --><dependency><groupId>io.springfox</groupId><artifactId>springfox-swagger2</artifactId><version>2.9.2</version></dependency><dependency><groupId>io.springfox</groupId><artifactId>springfox-swagger-ui</artifactId><version>2.9.2</version></dependency><dependency...
引入swagger3: swagger是一个接口管理工具,springboot集成swagger可以生成接口管理页面,方便调试; 第一步:创建接口; 代码语言:java 复制 importorg.springframework.web.bind.annotation.GetMapping;importorg.springframework.web.bind.annotation.RequestMapping;importorg.springframework.web.bind.annotation.RestController;@Re...
一、maven中引入 <!--swagger 3--><dependency><groupId>io.springfox</groupId><artifactId>springfox-boot-starter</artifactId><version>3.0.0</version></dependency> 二、application.yml配置 spring:mvc:pathmatch:matching-strategy:ant_path_matcher ...
Springboot引入拦截器 自定义的拦截器类 Interceptor package cn.zytao.taosir.auth.config; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web.servlet.HandlerInterceptor; ...
spring-boot-starter-aop: 主要用到了AOP,面向切面编程。 aviator: 谷歌的规则引擎,主要用来校验参数 fastjson: 阿里Json工具 commons-lang3: apache工具 lombok: 工具 swagger2: 生成接口文档 软件架构 软件架构说明 安装教程 mvn clean install 引入依赖