如何配置
引入依赖
1
2
3
4
5
<dependency>
<groupId>com.spring4all</groupId>
<artifactId>swagger-spring-boot-starter</artifactId>
<version>1.9.0.RELEASE</version>
</dependency>
application 配置
1
2
3
4
5
6
7
8
9
10
11
12
swagger:
enabled: true
base-package: com.flameking.parking.member
base-path: /**
authorization:
key-name: Authorization
docket:
v1:
title: 会员服务
# description: 会员服务Api
base-package: com.flameking.parking.member
version: 1.0
启动类开启注解
1
2
3
4
5
6
@EnableSwagger2Doc
public class ParkingMemberApplication {
public static void main(String[] args) {
SpringApplication.run(ParkingMemberApplication.class, args);
}
}