Skip to content

Commit f441ec5

Browse files
committed
feat: spring: update deprecated org.springframework.lang.Nullable for
Spring Boot 4 - Update import mapping for Nullable to org.jspecify.annotations.Nullable when useSpringBoot4 is enabled.
1 parent 4e81b85 commit f441ec5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • modules/openapi-generator/src/main/java/org/openapitools/codegen/languages

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ public void processOpts() {
551551
importMapping.put("JsonDeserialize", (useJackson3 ? JACKSON3_PACKAGE : JACKSON2_PACKAGE) + ".databind.annotation.JsonDeserialize");
552552

553553
typeMapping.put("file", "org.springframework.core.io.Resource");
554-
importMapping.put("Nullable", "org.springframework.lang.Nullable");
554+
importMapping.put("Nullable", isUseSpringBoot4() ? "org.jspecify.annotations.Nullable" : "org.springframework.lang.Nullable");
555555
importMapping.put("org.springframework.core.io.Resource", "org.springframework.core.io.Resource");
556556
importMapping.put("DateTimeFormat", "org.springframework.format.annotation.DateTimeFormat");
557557
importMapping.put("ParameterObject", "org.springdoc.api.annotations.ParameterObject");

0 commit comments

Comments
 (0)