diff --git a/docs/generators/spring.md b/docs/generators/spring.md
index 751f9b29f9dc..a3e9a35db1ee 100644
--- a/docs/generators/spring.md
+++ b/docs/generators/spring.md
@@ -35,7 +35,7 @@ sidebar_label: spring
|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false|
|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false|
|invokerPackage|root package for generated code| |org.openapitools.api|
-|java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|
- **true**
- Use Java 8 classes such as Base64. Use java8 default interface when a responseWrapper is used
- **false**
- Various third party libraries as needed
|true|
+|java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|- **true**
- Use Java 8 classes such as Base64. Use java8 default interface when a responseWrapper is used. IMPORTANT: This option has been deprecated as Java 8 is the default.
- **false**
- Various third party libraries as needed
|true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|library|library template (sub-template)|- **spring-boot**
- Spring-boot Server application using the SpringFox integration.
- **spring-mvc**
- Spring-MVC Server application using the SpringFox integration.
- **spring-cloud**
- Spring-Cloud-Feign client with Spring-Boot auto-configured settings.
|spring-boot|
|licenseName|The name of the license| |Unlicense|
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java
index 4daf182d0f93..a219a17a9de4 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java
@@ -186,7 +186,7 @@ private void updateJava8CliOptions() {
CliOption option = cliOptions.stream().filter(o -> JAVA_8.equals(o.getOpt())).findFirst()
.orElseThrow(() -> new RuntimeException("Missing java8 option"));
Map java8ModeOptions = option.getEnum();
- java8ModeOptions.put("true", "Use Java 8 classes such as Base64. Use java8 default interface when a responseWrapper is used");
+ java8ModeOptions.put("true", "Use Java 8 classes such as Base64. Use java8 default interface when a responseWrapper is used. IMPORTANT: This option has been deprecated as Java 8 is the default.");
}
@Override
@@ -217,9 +217,9 @@ public void processOpts() {
// Process java8 option before common java ones to change the default dateLibrary to java8.
LOGGER.info("----------------------------------");
if (additionalProperties.containsKey(JAVA_8)) {
- LOGGER.info("has JAVA8");
this.setJava8(Boolean.valueOf(additionalProperties.get(JAVA_8).toString()));
additionalProperties.put(JAVA_8, java8);
+ LOGGER.warn("java8 option has been deprecated as it's set to true by default (JDK7 support has been deprecated)");
}
if (this.java8 && !additionalProperties.containsKey(DATE_LIBRARY)) {
setDateLibrary("java8");
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache
index e3cf4da32171..1e05c4ab3bd1 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache
@@ -10,7 +10,7 @@
${java.version}
${java.version}
{{#useSpringfox}}
- 2.8.0
+ 2.9.2
{{/useSpringfox}}
{{#parentOverridden}}
@@ -24,7 +24,7 @@
org.springframework.boot
spring-boot-starter-parent
- {{#java8}}2.0.1.RELEASE{{/java8}}{{^java8}}1.5.12.RELEASE{{/java8}}
+ {{#java8}}2.3.3.RELEASE{{/java8}}{{^java8}}1.5.12.RELEASE{{/java8}}
{{/parentOverridden}}
@@ -97,7 +97,7 @@
javax.xml.bind
jaxb-api
- 2.2.11
+ 2.3.1
{{/useSpringfox}}
{{^useSpringfox}}
@@ -151,7 +151,7 @@
org.openapitools
jackson-databind-nullable
- 0.1.0
+ 0.2.1
{{#useBeanValidation}}
diff --git a/samples/client/petstore/spring-stubs/pom.xml b/samples/client/petstore/spring-stubs/pom.xml
index 18b3dc2308db..bd2dc92f3629 100644
--- a/samples/client/petstore/spring-stubs/pom.xml
+++ b/samples/client/petstore/spring-stubs/pom.xml
@@ -9,12 +9,12 @@
1.8
${java.version}
${java.version}
- 2.8.0
+ 2.9.2
org.springframework.boot
spring-boot-starter-parent
- 2.0.1.RELEASE
+ 2.3.3.RELEASE
src/main/java
@@ -38,7 +38,7 @@
javax.xml.bind
jaxb-api
- 2.2.11
+ 2.3.1
com.fasterxml.jackson.datatype
@@ -47,7 +47,7 @@
org.openapitools
jackson-databind-nullable
- 0.1.0
+ 0.2.1
diff --git a/samples/server/petstore/springboot-beanvalidation/pom.xml b/samples/server/petstore/springboot-beanvalidation/pom.xml
index eda7fc97d6f0..3dccfef842b4 100644
--- a/samples/server/petstore/springboot-beanvalidation/pom.xml
+++ b/samples/server/petstore/springboot-beanvalidation/pom.xml
@@ -9,12 +9,12 @@
1.8
${java.version}
${java.version}
- 2.8.0
+ 2.9.2
org.springframework.boot
spring-boot-starter-parent
- 2.0.1.RELEASE
+ 2.3.3.RELEASE
src/main/java
@@ -51,7 +51,7 @@
javax.xml.bind
jaxb-api
- 2.2.11
+ 2.3.1
com.fasterxml.jackson.datatype
@@ -60,7 +60,7 @@
org.openapitools
jackson-databind-nullable
- 0.1.0
+ 0.2.1
diff --git a/samples/server/petstore/springboot-delegate-j8/pom.xml b/samples/server/petstore/springboot-delegate-j8/pom.xml
index b3b8c885f0da..6bc55109688f 100644
--- a/samples/server/petstore/springboot-delegate-j8/pom.xml
+++ b/samples/server/petstore/springboot-delegate-j8/pom.xml
@@ -9,12 +9,12 @@
1.8
${java.version}
${java.version}
- 2.8.0
+ 2.9.2
org.springframework.boot
spring-boot-starter-parent
- 2.0.1.RELEASE
+ 2.3.3.RELEASE
src/main/java
@@ -51,7 +51,7 @@
javax.xml.bind
jaxb-api
- 2.2.11
+ 2.3.1
com.fasterxml.jackson.datatype
@@ -60,7 +60,7 @@
org.openapitools
jackson-databind-nullable
- 0.1.0
+ 0.2.1
diff --git a/samples/server/petstore/springboot-delegate/pom.xml b/samples/server/petstore/springboot-delegate/pom.xml
index 01f5ccf7905a..f2a3b7bd3b0f 100644
--- a/samples/server/petstore/springboot-delegate/pom.xml
+++ b/samples/server/petstore/springboot-delegate/pom.xml
@@ -9,12 +9,12 @@
1.8
${java.version}
${java.version}
- 2.8.0
+ 2.9.2
org.springframework.boot
spring-boot-starter-parent
- 2.0.1.RELEASE
+ 2.3.3.RELEASE
src/main/java
@@ -51,7 +51,7 @@
javax.xml.bind
jaxb-api
- 2.2.11
+ 2.3.1
com.fasterxml.jackson.datatype
@@ -60,7 +60,7 @@
org.openapitools
jackson-databind-nullable
- 0.1.0
+ 0.2.1
diff --git a/samples/server/petstore/springboot-implicitHeaders/pom.xml b/samples/server/petstore/springboot-implicitHeaders/pom.xml
index 320db0c02a0e..e539ef4b7dab 100644
--- a/samples/server/petstore/springboot-implicitHeaders/pom.xml
+++ b/samples/server/petstore/springboot-implicitHeaders/pom.xml
@@ -9,12 +9,12 @@
1.8
${java.version}
${java.version}
- 2.8.0
+ 2.9.2
org.springframework.boot
spring-boot-starter-parent
- 2.0.1.RELEASE
+ 2.3.3.RELEASE
src/main/java
@@ -51,7 +51,7 @@
javax.xml.bind
jaxb-api
- 2.2.11
+ 2.3.1
com.fasterxml.jackson.datatype
@@ -60,7 +60,7 @@
org.openapitools
jackson-databind-nullable
- 0.1.0
+ 0.2.1
diff --git a/samples/server/petstore/springboot-reactive/pom.xml b/samples/server/petstore/springboot-reactive/pom.xml
index 4e18946be43c..75fb1e674b58 100644
--- a/samples/server/petstore/springboot-reactive/pom.xml
+++ b/samples/server/petstore/springboot-reactive/pom.xml
@@ -13,7 +13,7 @@
org.springframework.boot
spring-boot-starter-parent
- 2.0.1.RELEASE
+ 2.3.3.RELEASE
src/main/java
@@ -63,7 +63,7 @@
org.openapitools
jackson-databind-nullable
- 0.1.0
+ 0.2.1
diff --git a/samples/server/petstore/springboot-useoptional/pom.xml b/samples/server/petstore/springboot-useoptional/pom.xml
index 76bec66a453b..4a8c22584d8c 100644
--- a/samples/server/petstore/springboot-useoptional/pom.xml
+++ b/samples/server/petstore/springboot-useoptional/pom.xml
@@ -9,12 +9,12 @@
1.8
${java.version}
${java.version}
- 2.8.0
+ 2.9.2
org.springframework.boot
spring-boot-starter-parent
- 2.0.1.RELEASE
+ 2.3.3.RELEASE
src/main/java
@@ -51,7 +51,7 @@
javax.xml.bind
jaxb-api
- 2.2.11
+ 2.3.1
com.fasterxml.jackson.datatype
@@ -60,7 +60,7 @@
org.openapitools
jackson-databind-nullable
- 0.1.0
+ 0.2.1
diff --git a/samples/server/petstore/springboot-virtualan/pom.xml b/samples/server/petstore/springboot-virtualan/pom.xml
index 809f9c1f9aac..d4445d17257f 100644
--- a/samples/server/petstore/springboot-virtualan/pom.xml
+++ b/samples/server/petstore/springboot-virtualan/pom.xml
@@ -9,12 +9,12 @@
1.8
${java.version}
${java.version}
- 2.8.0
+ 2.9.2
org.springframework.boot
spring-boot-starter-parent
- 2.0.1.RELEASE
+ 2.3.3.RELEASE
src/main/java
@@ -51,7 +51,7 @@
javax.xml.bind
jaxb-api
- 2.2.11
+ 2.3.1
com.fasterxml.jackson.datatype
@@ -60,7 +60,7 @@
org.openapitools
jackson-databind-nullable
- 0.1.0
+ 0.2.1
diff --git a/samples/server/petstore/springboot/pom.xml b/samples/server/petstore/springboot/pom.xml
index 6d6b85134aea..702a16abf2df 100644
--- a/samples/server/petstore/springboot/pom.xml
+++ b/samples/server/petstore/springboot/pom.xml
@@ -9,12 +9,12 @@
1.8
${java.version}
${java.version}
- 2.8.0
+ 2.9.2
org.springframework.boot
spring-boot-starter-parent
- 2.0.1.RELEASE
+ 2.3.3.RELEASE
src/main/java
@@ -51,7 +51,7 @@
javax.xml.bind
jaxb-api
- 2.2.11
+ 2.3.1
com.fasterxml.jackson.datatype
@@ -60,7 +60,7 @@
org.openapitools
jackson-databind-nullable
- 0.1.0
+ 0.2.1