Commit ac42cfc
authored
chore: migrate to Spring Boot 4 (#3804)
## Summary
Migrates the Tolgee platform backend from **Spring Boot 3 to Spring Boot
4** (Spring Framework 7). This is a large, cross-cutting framework
upgrade; opening as a **draft** while the test suite is brought fully
green.
Core version bumps:
| Area | From → To |
|------|-----------|
| Spring Boot | 3.x → **4.1.0** |
| Spring Framework | 6 → **7** |
| Hibernate ORM | 6 → **7.4.1** |
| Spring Data | 3 → **4** |
| Spring Batch | 5 → **6** |
| Spring Security | 6 → **7** |
| Jackson | 2 (`com.fasterxml`) → **3 (`tools.jackson`)** |
| Redisson | 3.27 → **4.6.1** |
| Spring Cloud Azure | 5.x → **7.3.0** |
| Kotlin | → **2.3.21** |
| Gradle | → **9.6.0** |
## Notable migration work
- **Autoconfigure package splits** — Boot 4 splits the autoconfigure
monolith into per-module packages (data-redis, hibernate, persistence,
security, servlet, webmvc-test, restclient, liquibase, …); imports and
excludes updated accordingly.
- **Jackson 2 → 3** — moved to `tools.jackson` coordinates and APIs;
annotations remain on `com.fasterxml.jackson.annotation`.
- **Liquibase** — Boot 4 moved Liquibase auto-configuration to a
separate `spring-boot-liquibase` module; added it so the custom
`SpringLiquibase` beans run before the `EntityManagerFactory`.
- **Redisson 4.x** — extend `RedissonAutoConfigurationV4`, exclude the
new unconditional V4 autoconfig, add `redisson-spring-cache` (split out
of core), and declare `micrometer-core` explicitly (Redisson 4 marks it
optional).
- **Hibernate 7 HQL** — added explicit `select` clauses to join queries
that no longer infer a result type.
- **JSONB attributes** — restored JSON-based deep-copy for
non-`Serializable` values (hypersistence-utils 3.15 dropped that
fallback).
- **JPA auditing / startup ordering** — wire the date-time provider via
`dateTimeProviderRef` and defer DB access out of bean construction,
since Boot 4 creates servlet-filter beans before Liquibase migrates.
### Upstream bug found
Hibernate 7's `hibernate-models` crashes with
`IndexOutOfBoundsException` on a JSONB entity attribute whose type is a
`Map` subclass reaching `Map<K,V>` through a one-type-parameter generic
intermediate. Reported upstream:
hibernate/hibernate-models#263 (worked around
in `CompactSharedMap`).
## Status
- ✅ Full backend compiles (all modules)
- ✅ Application boots end-to-end (context loads, Liquibase migrates, web
server starts, batch jobs execute)
- ✅ Core integration tests green (e.g.
`BatchJobsGeneralWithoutRedisTest`)
- ⏳ Widening test-suite coverage; the Redis-backed concurrent batch
tests (`BatchJobsGeneralWithRedisTest`, `BatchJobRecoveryTest`, …) are
pre-existing flaky/timing-sensitive tests still being verified
## Related
The matching `billing` branch (`bdshadow/spring-boot-4`) carries the
corresponding billing changes.1 parent bbb5a3c commit ac42cfc
424 files changed
Lines changed: 6780 additions & 2700 deletions
File tree
- .github
- actions/setup-env
- workflows
- backend
- api
- src/main/kotlin/io/tolgee
- api/v2/controllers/suggestion
- component
- configuration
- controllers
- hateoas
- ee
- websocket
- app
- src
- main
- kotlin/io/tolgee
- component
- configuration
- openApi
- health
- mcp
- tools
- resources
- test
- kotlin/io/tolgee
- activity
- api/v2/controllers
- administration
- batch
- configurationProps
- machineTranslation
- notification
- organizationController
- translationSuggestionController
- translations
- v2TranslationsController
- v2ExportController
- v2ImportController
- v2KeyController
- v2ProjectsController
- v2ScreenshotController
- autoTranslating
- automation
- batch
- controllers
- internal
- resetPassword
- jobs/migration/allOrganizationOwner
- openapi
- security
- rateLimits
- service
- project
- resources
- data
- src
- main
- kotlin/io/tolgee
- activity
- data
- iterceptor
- batch
- processors
- component
- automations/processors
- contentDelivery/cachePurging
- azureFrontDoor
- cloudflare
- eventListeners
- machineTranslation/providers
- configuration
- tolgee
- development/testDataBuilder
- data
- dtos/contentDelivery
- formats
- apple
- in/xcstrings
- out
- flutter
- in
- out
- genericStructuredFile/out
- json
- in
- out
- yaml
- in
- out
- jobs/migration
- allOrganizationOwner
- translationStats
- model
- branching
- contentDelivery
- dataImport
- keyBigMeta
- task
- translationMemory
- webhook
- pubSub
- repository
- activity
- contentDelivery
- dataImport
- translation
- security/thirdParty
- service
- dataImport
- export
- key
- organization
- projectExportImport
- sidechannel
- project
- queryBuilders
- translationViewBuilder
- task
- translation
- util
- resources
- db/changelog
- test/kotlin/io/tolgee
- pubSub
- service/projectExportImport
- unit
- activity
- formats
- android/out
- apple
- in
- out
- fluttter
- in
- out
- i18next
- in
- out
- json
- in
- out
- po/in
- properties/out
- yaml
- in
- out
- util
- util
- development
- ktlint
- misc
- src/main/kotlin/io/tolgee/fixtures
- security
- testing
- src/main/kotlin/io/tolgee
- fixtures
- testing
- assertions
- util
- docker/app
- ee/backend
- app
- src/main
- kotlin/io/tolgee/ee
- api/v2
- controllers
- qa
- slack
- hateoas/model/prompt
- component
- llm
- slackIntegration
- configuration
- data
- glossary
- label
- qa
- model
- repository
- branching
- glossary
- service
- eeSubscription
- glossary
- prompt
- qa
- slackIntegration
- resources/db/changelog
- tests
- src/test
- kotlin/io/tolgee/ee
- api/v2/controllers
- activity
- branching
- glossary
- qa
- task
- translationMemory
- projectExportImport
- selfHostedLimitsAndReporting
- service
- glossary
- qa
- translationMemory
- slack
- unit
- resources
- gradle
- wrapper
- webapp/src/service
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | | - | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
0 commit comments