SpringBoot整合Swagger 2
添加pom依赖
<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>启动类添加@EnableSwagger2注解
@EnableSwagger2@SpringBootApplicationpublic class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); }}- 启动项目,访问路径:http://localhost:8080/swagger-ui.html
- 运行结果:

继续阅读与本文标签相同的文章
上一篇 :
SpringBoot 整合 WebSocket
下一篇 :
SpringBoot 整合 Redis
-
一篇文章带你入门应用容器引擎Docker
2026-05-20栏目: 教程
-
java 命名规则
2026-05-20栏目: 教程
-
Docker 环境搭建和运维
2026-05-20栏目: 教程
-
分布式唯一ID系列(1)——为什么需要分布式ID以及分布式ID的业务需求
2026-05-20栏目: 教程
-
阿里毕玄:《A Berkeley View on Serverless Computing》读后感
2026-05-20栏目: 教程
