Skip to content

Conversation

@mariuszs
Copy link
Member

Summary

  • Upgrade to Spring Boot 4.0.1 and Jackson 3.x
  • Require Java 21
  • Add new modules: friendly-id-jackson2-datatype, friendly-id-jooq, friendly-id-jpa, friendly-id-openfeign
  • Add Spring Boot 3 sample with Jackson 2.x
  • Modernize code with Java 21 features (records, pattern matching, switch expressions, text blocks)
  • Fix SPI for Jackson 3 (tools.jackson.databind.JacksonModule)
  • Configure Lombok for Maven 3.14+

Breaking Changes

  • Minimum Java version: 21
  • Jackson 3.x (tools.jackson.) instead of Jackson 2.x (com.fasterxml.jackson.)
  • Use friendly-id-jackson2-datatype for Jackson 2.x compatibility

New Modules

  • friendly-id-jackson2-datatype - Jackson 2.x support
  • friendly-id-jooq - jOOQ integration
  • friendly-id-jpa - JPA integration
  • friendly-id-openfeign - OpenFeign integration

Test plan

  • All tests pass
  • Build succeeds with Java 21
  • Samples work correctly

…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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants