-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Allow excluding URLs from being handled by a root mapped Vaadin…
… Spring servlet (#14579) This makes it possible to make services like swagger work correctly even when Vaadin is mapped to the context root. Fixes #12949
- Loading branch information
Showing
12 changed files
with
195 additions
and
10 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
...aadin-spring-tests/test-spring-boot-contextpath/src/main/resources/application.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
server.port=8888 | ||
server.servlet.contextPath=/context | ||
vaadin.exclude-urls=/swagger-ui/** | ||
|
1 change: 1 addition & 0 deletions
1
...adin-spring-tests/test-spring-boot-only-prepare/src/main/resources/application.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
server.port=8888 | ||
vaadin.blacklisted-packages=vaadin-spring/target/test-classes | ||
vaadin.excludeUrls=/swagger-ui/** |
2 changes: 2 additions & 0 deletions
2
...adin-spring-tests/test-spring-boot-reverseproxy/src/main/resources/application.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
server.port=8888 | ||
proxy.port=9999 | ||
proxy.path=/public/path | ||
vaadin.excludeUrls=/swagger-ui/** | ||
springdoc.swagger-ui.configUrl=/public/path/v3/api-docs/swagger-config |
1 change: 1 addition & 0 deletions
1
...tests/vaadin-spring-tests/test-spring-boot-scan/src/main/resources/application.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
server.port=8888 | ||
vaadin.exclude-urls=/swagger-ui/** |
1 change: 1 addition & 0 deletions
1
flow-tests/vaadin-spring-tests/test-spring-boot/src/main/resources/application.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
server.port=8888 | ||
vaadin.exclude-urls=/swagger-ui/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...-spring-tests/test-spring-common/src/test/java/com/vaadin/flow/spring/test/SwaggerIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.vaadin.flow.spring.test; | ||
|
||
import org.junit.Test; | ||
|
||
public class SwaggerIT extends AbstractSpringTest { | ||
|
||
@Override | ||
protected String getTestPath() { | ||
return "/swagger-ui.html"; | ||
} | ||
|
||
@Test | ||
public void swaggerUIShown() { | ||
open(); | ||
waitUntil( | ||
driver -> driver.getPageSource().contains("OpenAPI definition") | ||
|| driver.getPageSource().contains("Swagger Petstore")); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
flow-tests/vaadin-spring-tests/test-spring-war/src/main/resources/application.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
vaadin.exclude-urls=/swagger-ui/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters