springboot配置swagger2
springboot+spring security配置swagger2
这里springboot整合springsecurity就不说了,上篇文章就有:https://www.cnblogs.com/qiantao/p/14605154.html
springboot版本:2.3.7、swagger2版本:2.9.2
1、pom.xml文件中添加相关依赖
<!-- SpringSecurity 安 全 框 架 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> <!-- swagger2 接 口 文 档 --> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.9.2</version> </dependency> <!-- swagger2 UI --> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger-ui</artifactId> <version>2.9.2</version> </dependency>