-
-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Labels
Description
Describe the bug.
We were trying to use the library to generate code; this code deployed as as jar to our repository and imported in a Spring Boot 3 project.
We have an error when starting our Spring Boot 3 project and we find out that this dependency is causing problem:
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<scope>compile</scope>
</dependency>
This dependency is using old javax, this dependency should be replaced (when using springBoot3 and not springBoot2) by:
<dependency>
<groupId>com.fasterxml.jackson.jakarta.rs</groupId>
<artifactId>jackson-jakarta-rs-json-provider</artifactId>
<scope>compile</scope>
</dependency>
Expected behavior
Use Jakarta compliant dependency for a Spring Boot 3 generated code.
<dependency>
<groupId>com.fasterxml.jackson.jakarta.rs</groupId>
<artifactId>jackson-jakarta-rs-json-provider</artifactId>
<scope>compile</scope>
</dependency>
Screenshots
How to Reproduce
-
Generate a Spring Boot 3 project
Follow the link with every needed dependencies to reproduce Spring Initializr -
Generate code with spring template
$ node --version
v18.14.2
$ npm i -g @asyncapi/cli
$ npm i -g @asyncapi/java-spring-template
$ wget https://raw.githubusercontent.com/ab510/asyncapi/refs/heads/master/examples/2.0.0/streetlights.yml
$ asyncapi generate fromTemplate streetlights.yml @asyncapi/java-spring-template --param maven=true --output generated-
- Install package to your device maven repository
Before I had to change StreetLightId equals function so it returns true (there is a compilation error).
$ cd generated-code
$ mvn install -DskipTests
- Then add the dependency to your Spring Boot 3 project:
<dependencies>
<dependency>
<groupId>com.asyncapi</groupId>
<artifactId>untitled</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
🥦 Browser
Google Chrome
👀 Have you checked for similar open issues?
- I checked and didn't find similar issue
🏢 Have you read the Contributing Guidelines?
- I have read the Contributing Guidelines
Are you willing to work on this issue ?
Yes I am willing to submit a PR!