Skip to content

#704: Bumped to SpringBoot4, SpringFramework7 and JDK17#705

Open
Stromner wants to merge 10 commits intocloudevents:mainfrom
Stromner:main
Open

#704: Bumped to SpringBoot4, SpringFramework7 and JDK17#705
Stromner wants to merge 10 commits intocloudevents:mainfrom
Stromner:main

Conversation

@Stromner
Copy link

@Stromner Stromner commented Jan 8, 2026

Resolves issue #704

@Stromner Stromner changed the title Issue 704: Bumped to SpringBoot4, SpringFramework7 and JDK25 #704: Bumped to SpringBoot4, SpringFramework7 and JDK25 Jan 8, 2026
@jacekbilski
Copy link

Are you sure you want to require Java 25? Seems a bit high to me. Spring Boot 4/Framework 7 require Java 17, the same with Jackson 3. I personally would have no issues with 25, but the broader community might not be ready yet.

@Stromner Stromner changed the title #704: Bumped to SpringBoot4, SpringFramework7 and JDK25 #704: Bumped to SpringBoot4, SpringFramework7 and JDK17 Jan 23, 2026
@Stromner
Copy link
Author

Stromner commented Jan 23, 2026

You're right, probably too excessive. I've downgraded it to 17. Jackson2 is deprecated in Spring Framework 7, it also causes a lot of extra headache if you try to run this in a project that is Spring Framework 7 and having to either be stuck using Jackson2 or shoehorn in both versions of the dep.

David Strömner added 7 commits January 23, 2026 15:38
Signed-off-by: David Strömner <david.stromner@stralfors.se>
Signed-off-by: David Strömner <david.stromner@stralfors.se>
Signed-off-by: David Strömner <david.stromner@stralfors.se>
Signed-off-by: David Strömner <david.stromner@stralfors.se>
Signed-off-by: David Strömner <david.stromner@stralfors.se>
Signed-off-by: David Strömner <david.stromner@stralfors.se>
Signed-off-by: David Strömner <david.stromner@stralfors.se>
Signed-off-by: David Strömner <david.stromner@stralfors.se>
@Stromner Stromner force-pushed the main branch 2 times, most recently from a1e3fca to cfd9af3 Compare January 26, 2026 05:53
Signed-off-by: David Strömner <david.stromner@stralfors.se>
Signed-off-by: David Strömner <david.stromner@stralfors.se>
@Stromner
Copy link
Author

Ready for review again

@danjee
Copy link

danjee commented Jan 26, 2026

Hello, any thoughts when a new version with these changes will be released?

@jacekbilski
Copy link

Ready for review again

Do you want a review from someone in particular, or a random guy from the Internet would also be OK? I might find some time this or next week, but I cannot promise anything. Still, I'm blocked with upgrades because of cloudevents so I'll try to find the time.

@Stromner
Copy link
Author

Stromner commented Feb 9, 2026

Do you want a review from someone in particular, or a random guy from the Internet would also be OK?

I always welcome extra eyes on code I've written so by all means if it interest you! Otherwise it was a maintainer I'm waiting for so it might get approved some day

Copy link

@jacekbilski jacekbilski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason why did you drop JAX-RS modules. I haven't found any mention here, that would mention, that they're deprecated or obsolete. And JAX-RS as a standard is not dead.

Current review I made just by looking at the code and building the project myself. I'll try to actually build my app next week and give it a spin. But, apart from the JAX-RS question above, I haven't found any showstoppers. Thanks for the effort.

public class DemoApplication {

public static void main(String[] args) throws Exception {
static void main(String[] args) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It needs to be public in Java 17.

Comment on lines -38 to -49
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>${jackson.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just my personal preference, but I tend to use BOMs more, feel somehow like a cleaner approach.

<junit-jupiter.version>5.7.0</junit-jupiter.version>
<assertj-core.version>3.27.6</assertj-core.version>
<junit-jupiter.version>6.0.1</junit-jupiter.version>
<jackson.version>3.0.3</jackson.version>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd personally push it back to cloudevents-json-jackson. JSON is just one of supported formats, I don't see why it deserves such importance to be mentioned at the top level.

Comment on lines +87 to +88
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.release>${java.version}</maven.compiler.release>

<link>https://fasterxml.github.io/jackson-databind/javadoc/2.10/</link>
</links>
<source>8</source>
<source>17</source>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<source>17</source>
<source>${java.version}</source>

Comment on lines -183 to +200
class Foo {
static class Foo {
private String value;

private String value;

public Foo() {
}

public Foo(String value) {
this.value = value;
}

public String getValue() {
return this.value;
}

public void setValue(String value) {
this.value = value;
}

@Override
public String toString() {
return "Foo [value=" + this.value + "]";
}
public String getValue() {
return this.value;
}

@Override
public String toString() {
return "Foo [value=" + this.value + "]";
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My proposal would be:

    record Foo(
			String value
	) {}

}

}
static class Foo {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, simply use a record.

public Stream<Map.Entry<String, TestCaseModel>> tckTestCases() {
ObjectMapper mapper = new YAMLMapper();
mapper.registerModule(JsonFormat.getCloudEventJacksonModule());
ObjectMapper mapper = YAMLMapper.builder().addModule(JsonFormat.getCloudEventJacksonModule()).build();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see that you didn't "break" it, but using YAMLMapper together with JsonFormat feels wrong. Just mentioning it, maybe it's working anyway.

@jacekbilski
Copy link

I ran https://docs.openrewrite.org/recipes/java/spring/boot4/upgradespringboot_4_0-community-edition#usage and it found some issues. For example, there are still some javax.* imports. I'll be investigating this further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants