swagger 설정 추가
This commit is contained in:
@@ -8,6 +8,8 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
compile "com.gsitm.ustra.java.starter:ustra-starter-vue-bo:${ustraVersion}"
|
||||
compile 'io.springfox:springfox-swagger2:2.9.2'
|
||||
compile 'io.springfox:springfox-swagger-ui:2.9.2'
|
||||
compile project(":cmm")
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package sample.ustraframework.java.bo.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.security.config.annotation.web.builders.WebSecurity;
|
||||
|
||||
import com.gsitm.ustra.java.security.config.UstraSecurityConfigure;
|
||||
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
import springfox.documentation.builders.PathSelectors;
|
||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||
import springfox.documentation.service.ApiInfo;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
|
||||
@Configuration
|
||||
@EnableSwagger2
|
||||
public class SwaggerConfiguration {
|
||||
@Bean
|
||||
public Docket swaggerApi() {
|
||||
return new Docket(DocumentationType.SWAGGER_2)
|
||||
.useDefaultResponseMessages(false)
|
||||
.select()
|
||||
.apis(RequestHandlerSelectors.basePackage("sample.ustraframework.java"))
|
||||
.paths(PathSelectors.ant("/api/**"))
|
||||
.build()
|
||||
.apiInfo(swaggerInfo());
|
||||
}
|
||||
|
||||
private ApiInfo swaggerInfo() {
|
||||
return new ApiInfoBuilder()
|
||||
.title("U.STRA Framework System Swagger")
|
||||
.description("U.STRA Framework System API 문서")
|
||||
//.license("HDHS Help System")
|
||||
//.licenseUrl("http://www.swaggerSample.com")
|
||||
.version("1.0.0")
|
||||
.build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
UstraSecurityConfigure swaggerSecurityConfigure() {
|
||||
return new UstraSecurityConfigure() {
|
||||
@Override
|
||||
public void postConfigure(WebSecurity web) throws Exception {
|
||||
web.ignoring().antMatchers("/v2/api-docs", "/swagger-resources/**", "/swagger-ui.html", "/webjars/**");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -16,10 +16,7 @@ mybatis:
|
||||
jdbc-type-for-null: "NULL"
|
||||
# mapUnderscoreToCamelCase: true
|
||||
|
||||
---
|
||||
spring:
|
||||
profiles: local
|
||||
|
||||
|
||||
ustra:
|
||||
core:
|
||||
process-info:
|
||||
@@ -37,13 +34,16 @@ ustra:
|
||||
password: ENC(ohS/a1/Q/lKriwUq3rqJqht76fQ0Bnge)
|
||||
file:
|
||||
enabled: true
|
||||
group:
|
||||
enabled: true
|
||||
mvc:
|
||||
view:
|
||||
api-prefix: api
|
||||
client-crypto-key: Z3NjLWNyeXB0by1rZXkxMQ==
|
||||
type: STATIC_THYEMELEAF
|
||||
rest:
|
||||
exclude-wrapping-url-patterns: /v2/api-docs,/swagger-resources/**,/swagger-ui.html,/webjars/**
|
||||
wrapper:
|
||||
exclude-request-url-patterns: /v2/api-docs
|
||||
exclude-response-url-patterns: /v2/api-docs
|
||||
management:
|
||||
bo:
|
||||
app:
|
||||
|
||||
Reference in New Issue
Block a user