Skip to content

Commit 233cbb2

Browse files
maarten-cbclaude
andauthored
DATA 3287 spring boot 4 (#1)
* Fixed build * Upgraded Gradle * Upgraded to Java 21 * Upgraded to Spring boot 4 * Removed tests without assertions * Modernize dependencies and fix Hibernate 7 alignment - Align crnk-data-jpa with Spring Boot 4 BOM: Hibernate 6.6.4→7.1.8, Jakarta Persistence 3.1→3.2, Spring 6.2→7.0, Jakarta EE 10→11 - Fix JpaCriteriaQueryBackend plural path handling for Hibernate 7: use isMember() for collection attributes, preserve MapJoin precedence - Replace deprecated Class.newInstance() with getConstructor().newInstance() - Use StandardCharsets.UTF_8 instead of Charset.forName("utf8") - Upgrade Reflections 0.9.11→0.10.2, AssertJ 2.2.0/3.9.1→3.27.3 - Replace Guava test usages (Sets, ImmutableMap/Set/List) with Java stdlib - Remove unused version properties from versions.properties Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Removed spring boot 1 setup. renamed spring boot 2 setup to spring boot 4 * Upgrade to Gradle 9 - Replace project.buildDir with layout.buildDirectory across all scripts and Java plugin code (removed in Gradle 9) - Replace TaskContainer.create() with register() in GeneratorPlugin - Replace setMain() with getMainClass().set() in ForkedGenerateTask - Replace mainClassName with application { mainClass.set() } in examples - Replace project.getProperties().get("sourceSets") with getExtensions() - Make ForkedGenerateTask abstract (Gradle 9 JavaExec requirement) - Upgrade dependency-management-plugin 1.0.0→1.1.7 - Upgrade vanniktech maven-publish-plugin 0.15.1→0.28.0 - Upgrade asciidoctor-gradle-jvm 3.3.2→4.0.3 - Remove JUnit 5.11 version pins; use JUnit 6.0.1 from Spring Boot 4 BOM - Add junit-platform-launcher to test runtime (Gradle 9 requirement) - Update Gradle wrapper from 8.13 to 9.0 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Migrate JUnit 4 to JUnit 5 (Jupiter) - Replace org.junit.Test with org.junit.jupiter.api.Test across 250+ files - Replace @Before/@after with @BeforeEach/@AfterEach - Replace @BeforeClass/@afterclass with @BeforeAll/@afterall - Replace @ignore with @disabled - Replace Assert.* with Assertions.* (JUnit 5 API) - Convert @test(expected=X.class) to assertThrows(X.class, ...) (~220 occurrences) - Convert ExpectedException rules to assertThrows pattern - Replace @RunWith(SpringJUnit4ClassRunner.class) with @ExtendWith(SpringExtension.class) - Replace @RunWith(MockitoJUnitRunner.class) with @ExtendWith(MockitoExtension.class) - Fix JUnit 5 assertion parameter order (message last, not first) - Add JerseyTestBase @BeforeEach/@AfterEach lifecycle bridge for JerseyTest - Keep CDI tests (CdiTestRunner) and JUnitParams tests on JUnit 4 vintage engine - Add mockito-junit-jupiter dependency for MockitoExtension support Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Remove JUnit 4 dependency and vintage engine - Remove junit:junit and junit-vintage-engine from all build.gradle files - Convert CDI tests from @RunWith(CdiTestRunner.class) to Weld SE container - Convert CrnkWebMvcTagsProviderTest from JUnitParams to @ParameterizedTest - Convert AbstractJpaTest from SpringJUnit4ClassRunner to SpringExtension - Remove DeltaSpike test-control dependency (replaced by direct Weld usage) - Clean remaining JUnit 4 imports, annotations, and Assert references - Convert remaining @test(expected=...) to assertThrows() - Add Hamcrest MatcherAssert import where assertThat is used directly Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Upgrade OkHttp 3.4→4.12 and Apache HttpClient 4.5→5.4 - Upgrade OkHttp from 3.4.1/3.9.0 to 4.12.0 across all modules - Fix RequestBody.create() parameter order (OkHttp 4 deprecation) - Rewrite Apache HttpClient adapter for HC5 API: org.apache.http → org.apache.hc.client5/core5 - Update HttpClientRequest to use HttpUriRequestBase, ClassicHttpResponse - Update HttpClientResponse to use HC5 EntityUtils and response API - Fix getUrl() to use getUri() instead of getRequestUri() (full URL) - Upgrade Brave from 4.9.1 to 6.0.3 for HC5 compatibility - Replace brave-instrumentation-httpclient with httpclient5 - Migrate Brave tests from zipkin2 Reporter to SpanHandler/MutableSpan - Add HttpClientAdapter.setClientBuilder() for custom build functions - Remove deprecated HttpClientBuilderFactory (replaced by setClientBuilder) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Fixed vulnerabilities * Simplified publishing Upgraded jackson * Fixed javadoc error * Add claude folder * Upgraded to Jackson 3 * Removed todo * Disabled doc publishing to git * Fix test in CI? --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4e4dd89 commit 233cbb2

978 files changed

Lines changed: 23197 additions & 24325 deletions

File tree

Some content is hidden

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

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ on:
99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
12-
name: Ubuntu Temurin Java 8
12+
name: Ubuntu Temurin Java 21
1313
steps:
1414
- name: Checkout
1515
uses: actions/checkout@v3
1616
- name: Setup JDK
1717
uses: actions/setup-java@v3
1818
with:
19-
java-version: '8'
19+
java-version: '21'
2020
distribution: 'temurin'
2121
- name: Set Gradle Wrapper Permissions
2222
run: chmod +x gradlew

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,5 @@ temp
135135

136136
# MacOS
137137
.DS_Store
138+
139+
/.claude

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Note that due to reliability issues of MavenCentral we only rarely publish there
2828

2929
## Requirements
3030

31-
Crnk requires Java 1.8 or later and an SLF4J setup for logging.
31+
Crnk requires Java 21 or later and an SLF4J setup for logging.
3232

3333
## Example
3434

@@ -62,7 +62,7 @@ dependencies {
6262
6363
annotationProcessor 'io.crnk:crnk-gen-java'
6464
65-
implementation "io.crnk:crnk-setup-spring-boot2"
65+
implementation "io.crnk:crnk-setup-spring-boot4"
6666
implementation "io.crnk:crnk-data-jpa"
6767
implementation "io.crnk:crnk-data-facet"
6868
implementation "io.crnk:crnk-format-plain-json"
@@ -196,4 +196,4 @@ Note as part of the build a local Node installation is downloaded to build the f
196196

197197
[![YourKit](https://www.yourkit.com/images/yklogo.png)](https://www.yourkit.com/youmonitor/)
198198

199-
We thank YourKit for supporting open source projects with profiler and monitoring tooling.
199+
We thank YourKit for supporting open source projects with profiler and monitoring tooling.

0 commit comments

Comments
 (0)