Skip to content

Commit 44179d2

Browse files
Java 21460 Move code from spring-boot-swagger & spring-boot-swagger-2 to spring-boot-swagger-springfox module (#14310)
* JAVA-21460 Upgrade spring-boot-swagger-jwt modules to use SpringDoc in place of SpringFox * JAVA-21460 Upgrade spring-boot-swagger-2 module to use SpringDoc in place of SpringFox * JAVA-21460 Upgrade spring-boot-swagger module to use SpringDoc in place of SpringFox * JAVA-21460 Move code from spring-boot-swagger & spring-boot-swagger-2 to spring-boot-swagger-springfox module * JAVA-21457 Upgrade spring-security-web-rest to use SpringDoc in place of SpringFox
1 parent 2f0f9d7 commit 44179d2

32 files changed

Lines changed: 140 additions & 36 deletions

spring-boot-modules/spring-boot-swagger-2/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@
55
- [Swagger @ApiParam vs @ApiModelProperty](https://www.baeldung.com/swagger-apiparam-vs-apimodelproperty)
66
- [Map Date Types With OpenAPI Generator](https://www.baeldung.com/openapi-map-date-types)
77
- [API First Development with Spring Boot and OpenAPI 3.0](https://www.baeldung.com/spring-boot-openapi-api-first-development)
8-
- [Change Swagger-UI URL prefix](https://www.baeldung.com/spring-boot-custom-swagger-url)

spring-boot-modules/spring-boot-swagger-2/pom.xml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@
3434
<artifactId>springfox-oas</artifactId>
3535
<version>${springfox.version}</version>
3636
</dependency>
37-
<dependency>
38-
<groupId>io.springfox</groupId>
39-
<artifactId>springfox-swagger-ui</artifactId>
40-
<version>${springfox.version}</version>
41-
</dependency>
4237
<dependency>
4338
<groupId>javax.validation</groupId>
4439
<artifactId>validation-api</artifactId>
@@ -48,11 +43,6 @@
4843
<artifactId>springfox-swagger2</artifactId>
4944
<version>${springfox.version}</version>
5045
</dependency>
51-
<dependency>
52-
<groupId>io.springfox</groupId>
53-
<artifactId>springfox-spring-webmvc</artifactId>
54-
<version>${springfox.version}</version>
55-
</dependency>
5646
</dependencies>
5747

5848
<build>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Relevant Articles:
2+
3+
- [Hiding Endpoints From Swagger Documentation in Spring Boot](https://www.baeldung.com/spring-swagger-hiding-endpoints)
4+
- [Swagger @Api Description Is Deprecated](https://www.baeldung.com/java-swagger-api-description-deprecated)
5+
- [Remove Basic Error Controller In SpringFox Swagger-UI](https://www.baeldung.com/spring-swagger-remove-error-controller)
6+
- [Change Swagger-UI URL prefix](https://www.baeldung.com/spring-boot-custom-swagger-url)
7+
- [Setting Up Swagger 2 with a Spring REST API Using Springfox](https://www.baeldung.com/swagger-2-documentation-for-spring-rest-api)
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<artifactId>spring-boot-swagger-springfox</artifactId>
7+
<version>0.1.0-SNAPSHOT</version>
8+
<name>spring-boot-swagger-springfox</name>
9+
<packaging>jar</packaging>
10+
<description>Module For Spring Boot Swagger Springfox</description>
11+
12+
<parent>
13+
<groupId>com.baeldung.spring-boot-modules</groupId>
14+
<artifactId>spring-boot-modules</artifactId>
15+
<version>1.0.0-SNAPSHOT</version>
16+
</parent>
17+
18+
<dependencies>
19+
<dependency>
20+
<groupId>org.springframework.boot</groupId>
21+
<artifactId>spring-boot-starter-web</artifactId>
22+
</dependency>
23+
<dependency>
24+
<groupId>io.springfox</groupId>
25+
<artifactId>springfox-boot-starter</artifactId>
26+
<version>${springfox.version}</version>
27+
</dependency>
28+
<dependency>
29+
<groupId>com.google.guava</groupId>
30+
<artifactId>guava</artifactId>
31+
<version>${guava.version}</version>
32+
</dependency>
33+
</dependencies>
34+
35+
<properties>
36+
<springfox.version>3.0.0</springfox.version>
37+
</properties>
38+
39+
</project>

spring-boot-modules/spring-boot-swagger/src/main/java/com/baeldung/apiswagger/Application.java renamed to spring-boot-modules/spring-boot-swagger-springfox/src/main/java/com/baeldung/apiswagger/Application.java

File renamed without changes.

spring-boot-modules/spring-boot-swagger/src/main/java/com/baeldung/apiswagger/config/SwaggerConfiguration.java renamed to spring-boot-modules/spring-boot-swagger-springfox/src/main/java/com/baeldung/apiswagger/config/SwaggerConfiguration.java

File renamed without changes.

spring-boot-modules/spring-boot-swagger/src/main/java/com/baeldung/apiswagger/controller/BookController.java renamed to spring-boot-modules/spring-boot-swagger-springfox/src/main/java/com/baeldung/apiswagger/controller/BookController.java

File renamed without changes.

spring-boot-modules/spring-boot-swagger-2/src/main/java/com/baeldung/springdoc/demo/SpringFoxExampleApplication.java renamed to spring-boot-modules/spring-boot-swagger-springfox/src/main/java/com/baeldung/springdoc/demo/SpringFoxExampleApplication.java

File renamed without changes.

spring-boot-modules/spring-boot-swagger-2/src/main/java/com/baeldung/springdoc/demo/config/SpringFoxSwaggerConfig.java renamed to spring-boot-modules/spring-boot-swagger-springfox/src/main/java/com/baeldung/springdoc/demo/config/SpringFoxSwaggerConfig.java

File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.baeldung.springdoc.demo.controller;
2+
3+
import org.springframework.stereotype.Controller;
4+
import org.springframework.web.bind.annotation.RequestMapping;
5+
6+
@Controller
7+
public class SwaggerController {
8+
9+
@RequestMapping("/myproject")
10+
public String getRedirectUrl() {
11+
return "redirect:swagger-ui.html";
12+
}
13+
}

0 commit comments

Comments
 (0)