Skip to content

Commit 73d1199

Browse files
committed
feat: upgrade to Spring Boot 4 and Jackson 3
- Upgrade to Spring Boot 4.0.1 and Jackson 3 - Add Jackson 2.x datatype module for backward compatibility - Add FriendlyId value object type - Add JPA, jOOQ, and OpenFeign modules - Move @IdFormat annotation to core module - Add Spring Boot 3 sample - Modernize code for Java 21 (records, pattern matching, text blocks) - Add Spring Security contracts sample - Update Maven wrapper to 3.9.12 BREAKING CHANGES: - Requires Java 21+ - Requires Spring Boot 4.0+ for Jackson 3 support - Use friendly-id-jackson2-datatype for Jackson 2.x projects
1 parent bc63e0a commit 73d1199

File tree

137 files changed

+4886
-1674
lines changed

Some content is hidden

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

137 files changed

+4886
-1674
lines changed

.github/workflows/maven.yml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,30 @@
11
name: Java CI
22

3-
on: [push]
3+
on:
4+
push:
5+
branches: [ master, feature/** ]
6+
pull_request:
7+
branches: [ master ]
48

59
jobs:
610
build:
7-
811
runs-on: ubuntu-latest
912

1013
steps:
11-
- uses: actions/checkout@v1
12-
- name: Set up JDK 1.8
13-
uses: actions/setup-java@v1
14-
with:
15-
java-version: 1.8
16-
- name: Build with Maven
17-
run: mvn -B package --file pom.xml
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Set up JDK 21
18+
uses: actions/setup-java@v4
19+
with:
20+
java-version: '21'
21+
distribution: 'temurin'
22+
cache: 'maven'
23+
24+
- name: Build with Maven
25+
run: mvn -B clean install --file pom.xml
26+
27+
- name: Upload coverage to Coveralls
28+
if: github.event_name != 'pull_request'
29+
run: mvn coveralls:report -DrepoToken=${{ secrets.COVERALLS_TOKEN }}
30+
continue-on-error: true

.github/workflows/release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Set up JDK 21
17+
uses: actions/setup-java@v4
18+
with:
19+
java-version: '21'
20+
distribution: 'temurin'
21+
cache: 'maven'
22+
server-id: central
23+
server-username: MAVEN_USERNAME
24+
server-password: MAVEN_PASSWORD
25+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
26+
gpg-passphrase: GPG_PASSPHRASE
27+
28+
- name: Extract version from tag
29+
id: get_version
30+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
31+
32+
- name: Build and deploy to Maven Central
33+
run: |
34+
mvn -B clean deploy -P release \
35+
-Drevision=${{ steps.get_version.outputs.VERSION }} \
36+
-DskipTests
37+
env:
38+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
39+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
40+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
41+
42+
- name: Create GitHub Release
43+
uses: softprops/action-gh-release@v1
44+
with:
45+
generate_release_notes: true
46+
files: |
47+
**/target/*.jar
48+
!**/target/*-sources.jar
49+
!**/target/*-javadoc.jar

.mvn/wrapper/MavenWrapperDownloader.java

Lines changed: 0 additions & 117 deletions
This file was deleted.

.mvn/wrapper/maven-wrapper.jar

-49.5 KB
Binary file not shown.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
2-
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar
1+
wrapperVersion=3.3.4
2+
distributionType=only-script
3+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.12/apache-maven-3.9.12-bin.zip

.sdkmanrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# SDKMAN configuration for friendly-id project
2+
# Auto-switch to this Java version when entering the directory
3+
# Usage: Enable auto-env in SDKMAN with: sdk config
4+
# Set sdkman_auto_env=true
5+
java=21.0.8-tem
5.93 KB
Binary file not shown.

CHANGELOG.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
- FriendlyId value object type (`com.devskiller.friendly_id.type.FriendlyId`) as an alternative to raw UUID
12+
- JPA integration module (`friendly-id-jpa`) with automatic AttributeConverter
13+
- OpenFeign integration module (`friendly-id-openfeign`) for FriendlyId support in Feign clients
14+
- jOOQ integration module (`friendly-id-jooq`) for FriendlyId support in jOOQ
15+
- Spring Boot JPA demo application showcasing FriendlyId with JPA, REST API, and OpenFeign
16+
17+
### Changed
18+
- Upgraded from Java 8 to Java 21
19+
- Upgraded from Spring Boot 2.2.2 to 3.4.1
20+
- Upgraded from JUnit 4 to JUnit 5
21+
- Migrated from Vavr property testing to JUnit 5 `@RepeatedTest`
22+
- Updated Spring Boot auto-configuration to use `AutoConfiguration.imports` instead of `spring.factories`
23+
24+
### Fixed
25+
- Fixed Jackson module serialization by adding `super.setupModule(context)` call in `FriendlyIdModule`
26+
- Fixed Spring Cloud version compatibility (2024.0.0 for Spring Boot 3.4.1)
27+
- Added `friendly-id-jackson-datatype` as dependency to `friendly-id-spring-boot-starter` for complete auto-configuration
28+
- Added `friendly-id-jackson-datatype` as dependency to `friendly-id-openfeign` for JSON serialization support
29+
30+
### Dependencies
31+
- `friendly-id-spring-boot-starter` now includes `friendly-id-jackson-datatype` transitively
32+
- `friendly-id-openfeign` now includes `friendly-id-jackson-datatype` transitively
33+
34+
### Infrastructure
35+
- Migrated from legacy Sonatype OSSRH to Central Portal for Maven Central publishing
36+
- Updated `central-publishing-maven-plugin` to 0.6.0 for automated publishing
37+
38+
## [1.1.0] - Previous version
39+
- Legacy implementation with UUID-only support

0 commit comments

Comments
 (0)