From: Gustavo Martin Morcuende Date: Wed, 6 Jan 2016 23:22:56 +0000 (+0100) Subject: Spring REST: remove doc from client y global maven projects X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=e8996b4a241dd278cb30a1375fe422cbc9020a05;p=JavaForFun Spring REST: remove doc from client y global maven projects --- diff --git a/SpringJava/REST/web-services-spring-rest-client/src/doc/main/java/de/spring/webservices/rest/doc/Swagger2Configuration.java b/SpringJava/REST/web-services-spring-rest-client/src/doc/main/java/de/spring/webservices/rest/doc/Swagger2Configuration.java deleted file mode 100644 index 6e0de24..0000000 --- a/SpringJava/REST/web-services-spring-rest-client/src/doc/main/java/de/spring/webservices/rest/doc/Swagger2Configuration.java +++ /dev/null @@ -1,52 +0,0 @@ -package de.spring.webservices.rest.doc; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.servlet.config.annotation.EnableWebMvc; - -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.swagger.web.UiConfiguration; -import springfox.documentation.swagger2.annotations.EnableSwagger2; - -@Configuration -@EnableWebMvc -@EnableSwagger2 -public class Swagger2Configuration { - private static final String DOCKET_ID = "web-services-spring-rest"; - - @Bean - public Docket documentation() { - return new Docket(DocumentationType.SWAGGER_2) - .groupName(DOCKET_ID) - .select() - .apis(RequestHandlerSelectors.withMethodAnnotation(RequestMapping.class)) - .paths(PathSelectors.any()) - .build() - .pathMapping("/") - .useDefaultResponseMessages(false) - .apiInfo(metadata()) - .enable(true); - } - - @Bean - UiConfiguration uiConfig() { - return UiConfiguration.DEFAULT; - } - - - private static ApiInfo metadata() { - return new ApiInfoBuilder() - .title("gumartinm REST API") - .description("Gustavo Martin Morcuende") - .version("1.0-SNAPSHOT") - .contact("gumartinm.name") - .build(); - } - -} diff --git a/SpringJava/REST/web-services-spring-rest-client/src/doc/main/resources/spring-configuration/spring-config.xml b/SpringJava/REST/web-services-spring-rest-client/src/doc/main/resources/spring-configuration/spring-config.xml deleted file mode 100644 index 68a47a4..0000000 --- a/SpringJava/REST/web-services-spring-rest-client/src/doc/main/resources/spring-configuration/spring-config.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - diff --git a/SpringJava/REST/web-services-spring-rest-global/src/doc/main/java/de/spring/webservices/rest/doc/Swagger2Configuration.java b/SpringJava/REST/web-services-spring-rest-global/src/doc/main/java/de/spring/webservices/rest/doc/Swagger2Configuration.java deleted file mode 100644 index 6e0de24..0000000 --- a/SpringJava/REST/web-services-spring-rest-global/src/doc/main/java/de/spring/webservices/rest/doc/Swagger2Configuration.java +++ /dev/null @@ -1,52 +0,0 @@ -package de.spring.webservices.rest.doc; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.servlet.config.annotation.EnableWebMvc; - -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.swagger.web.UiConfiguration; -import springfox.documentation.swagger2.annotations.EnableSwagger2; - -@Configuration -@EnableWebMvc -@EnableSwagger2 -public class Swagger2Configuration { - private static final String DOCKET_ID = "web-services-spring-rest"; - - @Bean - public Docket documentation() { - return new Docket(DocumentationType.SWAGGER_2) - .groupName(DOCKET_ID) - .select() - .apis(RequestHandlerSelectors.withMethodAnnotation(RequestMapping.class)) - .paths(PathSelectors.any()) - .build() - .pathMapping("/") - .useDefaultResponseMessages(false) - .apiInfo(metadata()) - .enable(true); - } - - @Bean - UiConfiguration uiConfig() { - return UiConfiguration.DEFAULT; - } - - - private static ApiInfo metadata() { - return new ApiInfoBuilder() - .title("gumartinm REST API") - .description("Gustavo Martin Morcuende") - .version("1.0-SNAPSHOT") - .contact("gumartinm.name") - .build(); - } - -} diff --git a/SpringJava/REST/web-services-spring-rest-global/src/doc/main/resources/spring-configuration/spring-config.xml b/SpringJava/REST/web-services-spring-rest-global/src/doc/main/resources/spring-configuration/spring-config.xml deleted file mode 100644 index 68a47a4..0000000 --- a/SpringJava/REST/web-services-spring-rest-global/src/doc/main/resources/spring-configuration/spring-config.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - -