-
Notifications
You must be signed in to change notification settings - Fork 14
feat: upgrade to Spring Boot 4.0.1, Jackson 3, and Java 21 #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mariuszs
wants to merge
27
commits into
master
Choose a base branch
from
feature/spring-boot-4-upgrade
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…tices - Migrate domain classes to Java 21 records (Foo, Bar) - Replace Lombok @value with @DaTa in HATEOAS resources to avoid final classes - Convert assemblers to @component with dependency injection - Remove manual JsonConfiguration in favor of component scanning - Replace manual toFriendlyId() calls with methodOn() for automatic conversion - Add @import annotations to @WebMvcTest for assembler beans - Replace @slf4j for cleaner logging Spring Boot Starter improvements: - Use @autoConfiguration instead of @configuration - Replace @ConditionalOnExpression with @ConditionalOnProperty - Add @ConditionalOnWebApplication for better targeting - Remove deprecated spring.factories in favor of AutoConfiguration.imports - Add comprehensive JavaDoc documentation - Document public converter classes Sample projects updates: - JUnit 4 to JUnit 5 migration in contracts sample - Update Spring Cloud Contract to 4.1.5 with JUnit 5 support - Fix content negotiation in customized sample - Modernize HATEOAS link building patterns - Remove redundant .sdkmanrc files from subdirectories All 13 tests passing across 4 sample projects
- Create new friendly-id-jooq module with jOOQ Converter - Implement bidirectional conversion between UUID and FriendlyId strings - Add comprehensive unit tests with 7 test cases - Document usage with jOOQ code generator in README - Add module to parent POM with jOOQ 3.19.16 dependency management
…ciency - Create FriendlyId value object in com.devskiller.friendly_id.type package - Store UUID internally (16 bytes) instead of String (~40-50 bytes) - Compute FriendlyId string representation on demand via toString() - Update jOOQ converter to use Converter<UUID, FriendlyId> instead of Converter<UUID, String> - Add comprehensive tests for FriendlyId value object (11 tests) - Update jOOQ converter tests to use FriendlyId type (8 tests) - Document 30-40% memory savings in README Benefits: - Memory efficient: ~28 bytes vs ~40-50 bytes for String - Type safety: Strong typing prevents mixing UUIDs with FriendlyIds - Pretty printing: Automatic FriendlyId string via toString() - Reusable: Can be used with JPA, Jackson, Spring MVC converters
- Create FriendlyId JPA AttributeConverter with auto-apply - Support Jakarta Persistence API 3.1.0 - Zero-configuration usage in JPA entities - Add comprehensive tests (6 tests) - Document usage with Spring Data JPA in README - Add Jakarta Persistence API to dependency management Benefits: - Auto-apply converter means no @convert annotation needed - Works seamlessly with Spring Data JPA repositories - Reuses FriendlyId value object from core module - Memory efficient: ~28 bytes vs ~40-50 bytes for String
- Add friendly-id-openfeign module with automatic FriendlyId encoding/decoding for Feign clients - Add converters for FriendlyId value object in Spring MVC (StringToFriendlyIdConverter, FriendlyIdToStringConverter) - Standardize all pom.xml files: add name/description tags, consolidate dependency management - Migrate friendly-id-jackson-datatype tests from JUnit 4 to JUnit 5 - Move Spring Cloud dependencies to parent pom dependencyManagement - Update README.md with documentation for jOOQ, JPA, and OpenFeign integrations
- Configure CI-friendly versioning using ${revision} property
- Update all modules to use ${revision} instead of hardcoded version
- Add revision property (1.1.1-SNAPSHOT) to parent and sample POMs
- Create GitHub Actions workflow for automated releases on tag push
- Update CI workflow to use Java 21 and modern actions (v4)
- Enable version override via CLI: mvn -Drevision=X.Y.Z
Release process:
1. Create tag: git tag -a vX.Y.Z -m "Release X.Y.Z"
2. Push tag: git push origin vX.Y.Z
3. GitHub Actions automatically builds and deploys to Maven Central
Closes #[issue-number] if applicable
- Add Spring Boot JPA demo application with FriendlyId value object - Add OpenFeign integration test demonstrating full FriendlyId flow - Fix Jackson module serialization by calling super.setupModule() - Add FriendlyId value object serializers/deserializers - Add friendly-id-jackson-datatype dependency to openfeign module - Add friendly-id-jackson-datatype dependency to spring-boot-starter - Update Spring Cloud version to 2024.0.2 in JPA demo - Remove OpenFeign auto-configuration to avoid circular dependencies
- Update distributionManagement to use Central Portal API - Replace nexus-staging-maven-plugin with central-publishing-maven-plugin - Add PUBLISHING.md with detailed publication instructions - Update CHANGELOG.md with infrastructure changes Migration from legacy OSSRH to new Central Portal system. Publishing configured but not executed - requires manual release.
- Upgrade Spring Boot from 3.4.1 to 4.0.1 - Upgrade Spring Cloud to 2025.0.0 - Migrate Jackson from com.fasterxml.jackson to tools.jackson (Jackson 3) - Update FriendlyIdModule to use SimpleModule instead of JacksonModule - Refactor serializers/deserializers for Jackson 3 API - Use createContextual for @IdFormat annotation support - Update OpenFeign config for new HttpMessageConverters location - Update sample projects for Spring Boot 4 test packages - Bump version to 2.0.0-SNAPSHOT for major version upgrade
- Use new @WebMvcTest from org.springframework.boot.webmvc.test.autoconfigure - Replace JacksonHttpMessageConverter with JacksonJsonHttpMessageConverter - Add spring-boot-starter-webmvc-test dependency - Replace OpenFeign with MockMvc in JPA demo tests - Use MockMvc instead of deprecated TestRestTemplate
- central-publishing-maven-plugin: 0.6.0 → 0.9.0 - maven-compiler-plugin: 3.14.0 → 3.14.1 - maven-surefire-plugin: 3.5.2 → 3.5.4 - maven-gpg-plugin: 3.2.5 → 3.2.8
- Add friendly-id-jackson2-datatype module for Jackson 2.x compatibility - Add friendly-id-spring-boot3-simple sample demonstrating usage with Spring Boot 3.4.1 and Jackson 2.x - Update jackson-datatype module service file for Jackson 3.x
- Convert test DTOs (Bar, Foo) to records - Use pattern matching in FriendlyId.equals() - Replace inner converter classes with lambdas and static imports - Improve UUID format detection with proper validation - Use text blocks and var keyword throughout - Simplify Application controllers to use record constructors
- Rename FriendlyIdModule to FriendlyIdJackson2Module in jackson2 module - Move IdFormat and FriendlyIdFormat to friendly-id core module - Update all imports in Jackson modules and samples - Fix Lombok configuration in contracts sample
- Replace Bar/Foo with Item record in all samples - Remove HATEOAS from contracts sample - Add Spring Security with authenticated/unauthenticated contracts - Add tests for @PathVariable and @RequestParam with UUID and FriendlyId types - Update contract files with proper package declarations
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Breaking Changes
New Modules
friendly-id-jackson2-datatype- Jackson 2.x supportfriendly-id-jooq- jOOQ integrationfriendly-id-jpa- JPA integrationfriendly-id-openfeign- OpenFeign integrationTest plan