mirror of
https://gitee.com/jamen/slife.git
synced 2026-11-01 06:43:39 +00:00
Merge remote-tracking branch 'origin/boot_2.x' into boot_2.x
This commit is contained in:
@@ -10,6 +10,7 @@ import springfox.documentation.builders.PathSelectors;
|
||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||
import springfox.documentation.schema.ModelRef;
|
||||
import springfox.documentation.service.ApiInfo;
|
||||
import springfox.documentation.service.Contact;
|
||||
import springfox.documentation.service.Parameter;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
@@ -20,20 +21,16 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by chen on 2017/4/19.
|
||||
* <p>
|
||||
* <p>
|
||||
* Describe: swagger 配置类
|
||||
*
|
||||
* @author jamen
|
||||
* @author felixu
|
||||
*/
|
||||
|
||||
@Configuration
|
||||
@EnableSwagger2
|
||||
public class SwaggerConfig {
|
||||
|
||||
|
||||
/**
|
||||
* 全局参数
|
||||
* @return
|
||||
*/
|
||||
private List<Parameter> parameter() {
|
||||
List<Parameter> params = new ArrayList<>();
|
||||
params.add(new ParameterBuilder().name("Authorization")
|
||||
@@ -48,7 +45,6 @@ public class SwaggerConfig {
|
||||
|
||||
@Bean
|
||||
public Docket createRestApi() {
|
||||
|
||||
return new Docket(DocumentationType.SWAGGER_2)
|
||||
.apiInfo(apiInfo())
|
||||
.select()
|
||||
@@ -61,13 +57,14 @@ public class SwaggerConfig {
|
||||
|
||||
private ApiInfo apiInfo() {
|
||||
return new ApiInfoBuilder()
|
||||
.title(" slife ")
|
||||
.description(" boot 脚手架")
|
||||
.termsOfServiceUrl("")
|
||||
.contact(" chenjianan ")
|
||||
.version("1.0")
|
||||
.title("slife")
|
||||
.description("基于Spring Boot2.x的脚手架项目")
|
||||
.termsOfServiceUrl("https://gitee.com/jamen/slife/contributors?ref=master")
|
||||
.contact(new Contact("jamen & felixu", "https://gitee.com/jamen/slife/tree/boot_2.x/", ""))
|
||||
.license("Apache License 2.0")
|
||||
.licenseUrl("http://www.apache.org/licenses/LICENSE-2.0")
|
||||
.version("2.0.0")
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ spring:
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
url: jdbc:mysql://localhost/slife?useUnicode=true&characterEncoding=utf8&useSSL=false
|
||||
username: root
|
||||
password: root
|
||||
password: felix19920320
|
||||
druid:
|
||||
validationQuery: SELECT 1
|
||||
initialSize: 10
|
||||
|
||||
Reference in New Issue
Block a user