项目实训小程序选座后端第一周(2)
swagger2使用
学习链接: swagger2
第一步:添加swagger-spring-boot-starter依赖
在pom.xml中加入依赖,具体如下:
<dependency>
<groupId>com.spring4all</groupId>
<artifactId>swagger-spring-boot-starter</artifactId>
<version>1.9.0.RELEASE</version>
</dependency>
第二步:应用主类中添加@EnableSwagger2Doc注解
第三步:application.yml中配置文档相关内容
title: boot-starter-swagger
description: Starter for swagger 2.x
version: 1.9.0.RELEASE
license: Apache License, Version 2.0
licenseUrl: https://www.apache.org/licenses/LICENSE-2.0.html
termsOfServiceUrl: https://github.com/dyc87112/spring-boot-starter-swagger
base-package: com.sdu.pick_seat
base-path: /**
通过idea上传到gitee事项
1.Git ->Commit
2.在右侧选择要上传到gitee的更新过的文件,下面是提交信息说明
3.点击push
ps
上传时注意仓库分支
git->branch->选择需要的分支->check out