You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/asciidoc/getting_started.adoc
+34-38Lines changed: 34 additions & 38 deletions
Original file line number
Diff line number
Diff line change
@@ -115,22 +115,43 @@ dependencies {
115
115
116
116
==== Migrating from existing 2.x version
117
117
===== Spring Boot Applications
118
-
1. Remove library inclusions of earlier
118
+
1. Remove library inclusions of earlier releases. Specifically remove `springfox-swagger2` and `springfox-swagger-ui` inclusions.
119
119
2. Remove the `@EnableSwagger2` annotations
120
-
3. Added the `springfox-boot-starter`
120
+
3. Add the `springfox-boot-starter`
121
121
4. Springfox 3.x removes dependencies on guava and other 3rd party libraries (not zero dep yet! depends on spring plugin
122
122
and open api libraries for annotations and models) so if you used guava predicates/functions those will need to
123
123
transition to java 8 function interfaces
124
124
125
125
===== Regular spring mvc
126
-
1. Remove library inclusions of earlier
127
-
2. Add `EnableOpenApi` for open API (and `@EnableSwagger2` for swagger 2.0)
128
-
3. Added the `springfox-oas` library
126
+
1. Remove library inclusions of earlier releases. Specifically remove `springfox-swagger2` and `springfox-swagger-ui` inclusions.
127
+
2. For OpenAPI add the `@EnableOpenApi` annotation (and `@EnableSwagger2` for swagger 2.0)
128
+
3. For OpenAPI add the `springfox-oas` library dependency (for swagger 2.0 use `springfox-swagger2`)
129
129
4. Springfox 3.x removes dependencies on guava and other 3rd party libraries (not zero dep yet! depends on spring plugin
130
130
and open api libraries for annotations and models) so if you used guava predicates/functions those will need to
131
131
transition to java 8 function interfaces
132
132
133
-
NOTE: Would love feedback to make this experience better
133
+
===== Changes in swagger-ui
134
+
NOTE: For non-boot applications `springfox-swagger-ui` is no longer automatically enabled by adding the dependency. It needs to be explicitly register
135
+
using a resource handler configurer (`WebFluxConfigurer` or `WebMvcConfigurer`). Here is how it is configured in
136
+
`springfox-boot-starter`
137
+
138
+
NOTE: swagger-ui location has moved from `http://host/context-path/swagger-ui.html` to `http://host/context-path/swagger-ui/index.html`
139
+
OR `http://host/context-path/swagger-ui/` for short. This makes it work much better with pulling it as a web jar and turning it off
140
+
using configuration properties if not needed.
141
+
142
+
For WebMvc https://github.com/springfox/springfox/blob/master/springfox-boot-starter/src/main/java/springfox/boot/starter/autoconfigure/SwaggerUiWebMvcConfigurer.java[SwagggerUIWebMvcConfigurer.java]
For WebFlux https://github.com/springfox/springfox/blob/master/springfox-boot-starter/src/main/java/springfox/boot/starter/autoconfigure/SwaggerUiWebFluxConfigurer.java[SwagggerUIWebMvcConfigurer.java]
Copy file name to clipboardExpand all lines: springfox-boot-starter/src/main/java/springfox/boot/starter/autoconfigure/SpringfoxConfigurationProperties.java
0 commit comments