Skip to content

Commit 6cf78e7

Browse files
authored
[java][resttemplate] Add support for Jackson 3 and Spring Boot 4 in Java resttemplate (#23144)
* feat: add support for Jackson 3 and Spring Boot 4 in Java resttemplate client generation * chore: remove deprecated resttemplate-springBoot4 paths from YAML configuration * feat: add serialization library support for Jackson 3 in Java client * chore: initialize project structure and add initial files * feat: update library template for Spring RestTemplate to support Jackson 3 * chore: add paths for resttemplate-springBoot4 in YAML configuration * chore: remove unused test files from the project * chore: add libs.versions.toml and update FILES for new test files * chore: remove unused test files from the project
1 parent 33a4456 commit 6cf78e7

File tree

563 files changed

+50549
-89
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

563 files changed

+50549
-89
lines changed

.github/workflows/samples-java-client-jdk17.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
paths:
66
- samples/client/petstore/java/resttemplate-jakarta/**
7+
- samples/client/petstore/java/resttemplate-springBoot4-*/**
78
- samples/client/petstore/java/webclient-jakarta/**
89
- samples/client/petstore/java/restclient-*/**
910
- samples/client/others/java/webclient-sealedInterface/**
@@ -13,6 +14,7 @@ on:
1314
pull_request:
1415
paths:
1516
- samples/client/petstore/java/resttemplate-jakarta/**
17+
- samples/client/petstore/java/resttemplate-springBoot4-*/**
1618
- samples/client/petstore/java/webclient-jakarta/**
1719
- samples/client/petstore/java/restclient-*/**
1820
- samples/client/others/java/webclient-sealedInterface/**
@@ -29,6 +31,8 @@ jobs:
2931
sample:
3032
# clients
3133
- samples/client/petstore/java/resttemplate-jakarta
34+
- samples/client/petstore/java/resttemplate-springBoot4-jackson2
35+
- samples/client/petstore/java/resttemplate-springBoot4-jackson3
3236
- samples/client/petstore/java/webclient-jakarta
3337
- samples/client/petstore/java/restclient
3438
- samples/client/petstore/java/restclient-nullable-arrays
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
generatorName: java
2+
outputDir: samples/client/petstore/java/resttemplate-springBoot4-jackson2
3+
library: resttemplate
4+
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/Java
6+
additionalProperties:
7+
artifactId: petstore-resttemplate
8+
hideGenerationTimestamp: "true"
9+
containerDefaultToNull: "true"
10+
useJakartaEe: true
11+
useSpringBoot4: true
12+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
generatorName: java
2+
outputDir: samples/client/petstore/java/resttemplate-springBoot4-jackson3
3+
library: resttemplate
4+
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/Java
6+
additionalProperties:
7+
artifactId: petstore-resttemplate
8+
hideGenerationTimestamp: "true"
9+
containerDefaultToNull: "true"
10+
useJakartaEe: true
11+
useSpringBoot4: true
12+
useJackson3: true
13+
openApiNullable: false

docs/generators/java-microprofile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
6464
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
6565
|invokerPackage|root package for generated code| |org.openapitools.client|
6666
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true|
67-
|library|library template (sub-template) to use|<dl><dt>**jersey2**</dt><dd>HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.17.1</dd><dt>**jersey3**</dt><dd>HTTP client: Jersey client 3.1.1. JSON processing: Jackson 2.17.1</dd><dt>**feign**</dt><dd>HTTP client: OpenFeign 13.2.1. JSON processing: Jackson 2.17.1 or Gson 2.10.1</dd><dt>**feign-hc5**</dt><dd>HTTP client: OpenFeign 13.2.1/HttpClient5 5.4.2. JSON processing: Jackson 2.17.1 or Gson 2.10.1</dd><dt>**okhttp-gson**</dt><dd>[DEFAULT] HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.</dd><dt>**retrofit2**</dt><dd>HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1 (Retrofit 2.5.0) or Jackson 2.17.1. Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)</dd><dt>**resttemplate**</dt><dd>HTTP client: Spring RestTemplate 5.3.33 (6.1.5 if `useJakartaEe=true`). JSON processing: Jackson 2.17.1</dd><dt>**webclient**</dt><dd>HTTP client: Spring WebClient 5.1.18. JSON processing: Jackson 2.17.1</dd><dt>**restclient**</dt><dd>HTTP client: Spring RestClient 6.1.6. JSON processing: Jackson 2.17.1</dd><dt>**resteasy**</dt><dd>HTTP client: Resteasy client 4.7.6. JSON processing: Jackson 2.17.1</dd><dt>**vertx**</dt><dd>HTTP client: VertX client 3.5.2. JSON processing: Jackson 2.17.1</dd><dt>**google-api-client**</dt><dd>HTTP client: Google API client 2.2.0. JSON processing: Jackson 2.17.1</dd><dt>**rest-assured**</dt><dd>HTTP client: rest-assured 5.3.2. JSON processing: Gson 2.10.1 or Jackson 2.17.1. Only for Java 8</dd><dt>**native**</dt><dd>HTTP client: Java native HttpClient. JSON processing: Jackson 2.17.1. Only for Java11+</dd><dt>**microprofile**</dt><dd>HTTP client: Microprofile client 2.0 (default, set desired version via `microprofileRestClientVersion=x.x.x`). JSON processing: JSON-B 1.0.2 or Jackson 2.17.1</dd><dt>**apache-httpclient**</dt><dd>HTTP client: Apache httpclient 5.2.1. JSON processing: Jackson 2.17.1</dd></dl>|okhttp-gson|
67+
|library|library template (sub-template) to use|<dl><dt>**jersey2**</dt><dd>HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.17.1</dd><dt>**jersey3**</dt><dd>HTTP client: Jersey client 3.1.1. JSON processing: Jackson 2.17.1</dd><dt>**feign**</dt><dd>HTTP client: OpenFeign 13.2.1. JSON processing: Jackson 2.17.1 or Gson 2.10.1</dd><dt>**feign-hc5**</dt><dd>HTTP client: OpenFeign 13.2.1/HttpClient5 5.4.2. JSON processing: Jackson 2.17.1 or Gson 2.10.1</dd><dt>**okhttp-gson**</dt><dd>[DEFAULT] HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.</dd><dt>**retrofit2**</dt><dd>HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1 (Retrofit 2.5.0) or Jackson 2.17.1. Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)</dd><dt>**resttemplate**</dt><dd>HTTP client: Spring RestTemplate 5.3.33 (6.2.x if `useJakartaEe=true`, 7.x.x if `useSpringBoot4=true`). JSON processing: Jackson 2.x (3.x if `useJackson3=true`)</dd><dt>**webclient**</dt><dd>HTTP client: Spring WebClient 5.1.18. JSON processing: Jackson 2.17.1</dd><dt>**restclient**</dt><dd>HTTP client: Spring RestClient 6.1.6. JSON processing: Jackson 2.17.1</dd><dt>**resteasy**</dt><dd>HTTP client: Resteasy client 4.7.6. JSON processing: Jackson 2.17.1</dd><dt>**vertx**</dt><dd>HTTP client: VertX client 3.5.2. JSON processing: Jackson 2.17.1</dd><dt>**google-api-client**</dt><dd>HTTP client: Google API client 2.2.0. JSON processing: Jackson 2.17.1</dd><dt>**rest-assured**</dt><dd>HTTP client: rest-assured 5.3.2. JSON processing: Gson 2.10.1 or Jackson 2.17.1. Only for Java 8</dd><dt>**native**</dt><dd>HTTP client: Java native HttpClient. JSON processing: Jackson 2.17.1. Only for Java11+</dd><dt>**microprofile**</dt><dd>HTTP client: Microprofile client 2.0 (default, set desired version via `microprofileRestClientVersion=x.x.x`). JSON processing: JSON-B 1.0.2 or Jackson 2.17.1</dd><dt>**apache-httpclient**</dt><dd>HTTP client: Apache httpclient 5.2.1. JSON processing: Jackson 2.17.1</dd></dl>|okhttp-gson|
6868
|licenseName|The name of the license| |Unlicense|
6969
|licenseUrl|The URL of the license| |http://unlicense.org|
7070
|microprofileFramework|Framework for microprofile. Possible values &quot;kumuluzee&quot;| |null|

docs/generators/java.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
6464
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
6565
|invokerPackage|root package for generated code| |org.openapitools.client|
6666
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true|
67-
|library|library template (sub-template) to use|<dl><dt>**jersey2**</dt><dd>HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.17.1</dd><dt>**jersey3**</dt><dd>HTTP client: Jersey client 3.1.1. JSON processing: Jackson 2.17.1</dd><dt>**feign**</dt><dd>HTTP client: OpenFeign 13.2.1. JSON processing: Jackson 2.17.1 or Gson 2.10.1</dd><dt>**feign-hc5**</dt><dd>HTTP client: OpenFeign 13.2.1/HttpClient5 5.4.2. JSON processing: Jackson 2.17.1 or Gson 2.10.1</dd><dt>**okhttp-gson**</dt><dd>[DEFAULT] HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.</dd><dt>**retrofit2**</dt><dd>HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1 (Retrofit 2.5.0) or Jackson 2.17.1. Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)</dd><dt>**resttemplate**</dt><dd>HTTP client: Spring RestTemplate 5.3.33 (6.1.5 if `useJakartaEe=true`). JSON processing: Jackson 2.17.1</dd><dt>**webclient**</dt><dd>HTTP client: Spring WebClient 5.1.18. JSON processing: Jackson 2.17.1</dd><dt>**restclient**</dt><dd>HTTP client: Spring RestClient 6.1.6. JSON processing: Jackson 2.17.1</dd><dt>**resteasy**</dt><dd>HTTP client: Resteasy client 4.7.6. JSON processing: Jackson 2.17.1</dd><dt>**vertx**</dt><dd>HTTP client: VertX client 3.5.2. JSON processing: Jackson 2.17.1</dd><dt>**google-api-client**</dt><dd>HTTP client: Google API client 2.2.0. JSON processing: Jackson 2.17.1</dd><dt>**rest-assured**</dt><dd>HTTP client: rest-assured 5.3.2. JSON processing: Gson 2.10.1 or Jackson 2.17.1. Only for Java 8</dd><dt>**native**</dt><dd>HTTP client: Java native HttpClient. JSON processing: Jackson 2.17.1. Only for Java11+</dd><dt>**microprofile**</dt><dd>HTTP client: Microprofile client 2.0 (default, set desired version via `microprofileRestClientVersion=x.x.x`). JSON processing: JSON-B 1.0.2 or Jackson 2.17.1</dd><dt>**apache-httpclient**</dt><dd>HTTP client: Apache httpclient 5.2.1. JSON processing: Jackson 2.17.1</dd></dl>|okhttp-gson|
67+
|library|library template (sub-template) to use|<dl><dt>**jersey2**</dt><dd>HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.17.1</dd><dt>**jersey3**</dt><dd>HTTP client: Jersey client 3.1.1. JSON processing: Jackson 2.17.1</dd><dt>**feign**</dt><dd>HTTP client: OpenFeign 13.2.1. JSON processing: Jackson 2.17.1 or Gson 2.10.1</dd><dt>**feign-hc5**</dt><dd>HTTP client: OpenFeign 13.2.1/HttpClient5 5.4.2. JSON processing: Jackson 2.17.1 or Gson 2.10.1</dd><dt>**okhttp-gson**</dt><dd>[DEFAULT] HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.</dd><dt>**retrofit2**</dt><dd>HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1 (Retrofit 2.5.0) or Jackson 2.17.1. Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)</dd><dt>**resttemplate**</dt><dd>HTTP client: Spring RestTemplate 5.3.33 (6.2.x if `useJakartaEe=true`, 7.x.x if `useSpringBoot4=true`). JSON processing: Jackson 2.x (3.x if `useJackson3=true`)</dd><dt>**webclient**</dt><dd>HTTP client: Spring WebClient 5.1.18. JSON processing: Jackson 2.17.1</dd><dt>**restclient**</dt><dd>HTTP client: Spring RestClient 6.1.6. JSON processing: Jackson 2.17.1</dd><dt>**resteasy**</dt><dd>HTTP client: Resteasy client 4.7.6. JSON processing: Jackson 2.17.1</dd><dt>**vertx**</dt><dd>HTTP client: VertX client 3.5.2. JSON processing: Jackson 2.17.1</dd><dt>**google-api-client**</dt><dd>HTTP client: Google API client 2.2.0. JSON processing: Jackson 2.17.1</dd><dt>**rest-assured**</dt><dd>HTTP client: rest-assured 5.3.2. JSON processing: Gson 2.10.1 or Jackson 2.17.1. Only for Java 8</dd><dt>**native**</dt><dd>HTTP client: Java native HttpClient. JSON processing: Jackson 2.17.1. Only for Java11+</dd><dt>**microprofile**</dt><dd>HTTP client: Microprofile client 2.0 (default, set desired version via `microprofileRestClientVersion=x.x.x`). JSON processing: JSON-B 1.0.2 or Jackson 2.17.1</dd><dt>**apache-httpclient**</dt><dd>HTTP client: Apache httpclient 5.2.1. JSON processing: Jackson 2.17.1</dd></dl>|okhttp-gson|
6868
|licenseName|The name of the license| |Unlicense|
6969
|licenseUrl|The URL of the license| |http://unlicense.org|
7070
|microprofileFramework|Framework for microprofile. Possible values &quot;kumuluzee&quot;| |null|

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ public JavaClientCodegen() {
280280
supportedLibraries.put(FEIGN_HC5, "HTTP client: OpenFeign 13.2.1/HttpClient5 5.4.2. JSON processing: Jackson 2.17.1 or Gson 2.10.1");
281281
supportedLibraries.put(OKHTTP_GSON, "[DEFAULT] HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.");
282282
supportedLibraries.put(RETROFIT_2, "HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1 (Retrofit 2.5.0) or Jackson 2.17.1. Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)");
283-
supportedLibraries.put(RESTTEMPLATE, "HTTP client: Spring RestTemplate 5.3.33 (6.1.5 if `useJakartaEe=true`). JSON processing: Jackson 2.17.1");
283+
supportedLibraries.put(RESTTEMPLATE, "HTTP client: Spring RestTemplate 5.3.33 (6.2.x if `useJakartaEe=true`, 7.x.x if `useSpringBoot4=true`). JSON processing: Jackson 2.x (3.x if `useJackson3=true`)");
284284
supportedLibraries.put(WEBCLIENT, "HTTP client: Spring WebClient 5.1.18. JSON processing: Jackson 2.17.1");
285285
supportedLibraries.put(RESTCLIENT, "HTTP client: Spring RestClient 6.1.6. JSON processing: Jackson 2.17.1");
286286
supportedLibraries.put(RESTEASY, "HTTP client: Resteasy client 4.7.6. JSON processing: Jackson 2.17.1");
@@ -307,7 +307,7 @@ public JavaClientCodegen() {
307307
serializationLibrary.setEnum(serializationOptions);
308308
cliOptions.add(serializationLibrary);
309309
cliOptions.add(CliOption.newBoolean(USE_SPRING_BOOT4, "Generate code and provide dependencies for use with Spring Boot 4.x.", useSpringBoot4));
310-
cliOptions.add(CliOption.newBoolean(USE_JACKSON_3, "Set it in order to use jackson 3 dependencies (only allowed when `" + USE_SPRING_BOOT4 + "` is set and incompatible with `"+OPENAPI_NULLABLE+"`).", useJackson3)); // Ensure the OAS 3.x discriminator mappings include any descendent schemas that allOf
310+
cliOptions.add(CliOption.newBoolean(USE_JACKSON_3, "Set it in order to use jackson 3 dependencies (only allowed when `" + USE_SPRING_BOOT4 + "` is set and incompatible with `" + OPENAPI_NULLABLE + "`).", useJackson3)); // Ensure the OAS 3.x discriminator mappings include any descendent schemas that allOf
311311
// inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values,
312312
// and the discriminator mapping schemas in the OAS document.
313313
this.setLegacyDiscriminatorBehavior(false);
@@ -378,14 +378,14 @@ public void processOpts() {
378378
convertPropertyToBooleanAndWriteBack(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP, this::setUseOneOfDiscriminatorLookup);
379379
convertPropertyToBooleanAndWriteBack(USE_JACKSON_3, this::setUseJackson3);
380380
convertPropertyToBooleanAndWriteBack(USE_SPRING_BOOT4, this::setUseSpringBoot4);
381-
if(isUseJackson3() && !isUseSpringBoot4()){
381+
if (isUseJackson3() && !isUseSpringBoot4()) {
382382
throw new IllegalArgumentException("useJackson3 is only available with Spring Boot >= 4");
383383
}
384-
if(isUseJackson3() && isOpenApiNullable()){
384+
if (isUseJackson3() && isOpenApiNullable()) {
385385
throw new IllegalArgumentException("openApiNullable cannot be set with useJackson3");
386386
}
387387

388-
if(this.useJackson3){
388+
if (this.useJackson3) {
389389
this.applyJackson3Package();
390390
} else {
391391
this.applyJackson2Package();

modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
package {{invokerPackage}};
44

55
{{#withXml}}
6-
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
7-
import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator;
6+
import {{jacksonPackage}}.dataformat.xml.XmlMapper;
7+
import {{jacksonPackage}}.dataformat.xml.ser.ToXmlGenerator;
88
{{/withXml}}
99
import org.apache.commons.logging.Log;
1010
import org.apache.commons.logging.LogFactory;

modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,22 @@ ext {
115115
{{#swagger2AnnotationLibrary}}
116116
swagger_annotations_version = "2.2.9"
117117
{{/swagger2AnnotationLibrary}}
118+
{{#useJackson3}}
119+
jackson_version = "3.1.0"
120+
{{/useJackson3}}
121+
{{^useJackson3}}
118122
jackson_version = "2.21.1"
123+
{{/useJackson3}}
119124
jackson_annotations_version = "2.21"
120-
jackson_databind_version = "2.21.1"
121125
{{#openApiNullable}}
122126
jackson_databind_nullable_version = "0.2.9"
123127
{{/openApiNullable}}
128+
{{#useSpringBoot4}}
129+
spring_web_version = "7.0.5"
130+
jakarta_annotation_version = "3.0.0"
131+
bean_validation_version = "3.1.1"
132+
{{/useSpringBoot4}}
133+
{{^useSpringBoot4}}
124134
{{#useJakartaEe}}
125135
spring_web_version = "6.2.8"
126136
jakarta_annotation_version = "2.1.1"
@@ -131,6 +141,7 @@ ext {
131141
jakarta_annotation_version = "1.3.5"
132142
bean_validation_version = "2.0.2"
133143
{{/useJakartaEe}}
144+
{{/useSpringBoot4}}
134145
jodatime_version = "2.9.9"
135146
junit_version = "5.10.2"
136147
}
@@ -145,25 +156,27 @@ dependencies {
145156
implementation "com.google.code.findbugs:jsr305:3.0.2"
146157
implementation "org.springframework:spring-web:$spring_web_version"
147158
implementation "org.springframework:spring-context:$spring_web_version"
148-
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
159+
implementation "{{jacksonPackage}}.core:jackson-core:$jackson_version"
149160
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_annotations_version"
150-
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
161+
implementation "{{jacksonPackage}}.core:jackson-databind:$jackson_version"
151162
{{^useJakartaEe}}
152163
implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
153164
{{/useJakartaEe}}
154165
{{#useJakartaEe}}
155-
implementation "com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-json-provider:$jackson_version"
166+
implementation "{{jacksonPackage}}.jakarta.rs:jackson-jakarta-rs-json-provider:$jackson_version"
156167
{{/useJakartaEe}}
157168
{{#openApiNullable}}
158169
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
159170
{{/openApiNullable}}
171+
{{^useJackson3}}
160172
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
173+
{{/useJackson3}}
161174
{{#joda}}
162-
implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
175+
implementation "{{jacksonPackage}}.datatype:jackson-datatype-joda:$jackson_version"
163176
implementation "joda-time:joda-time:$jodatime_version"
164177
{{/joda}}
165178
{{#withXml}}
166-
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jackson_version"
179+
implementation "{{jacksonPackage}}.dataformat:jackson-dataformat-xml:$jackson_version"
167180
implementation "io.github.threeten-jaxb:threeten-jaxb-core:1.2"
168181
{{/withXml}}
169182
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"

0 commit comments

Comments
 (0)