$ the-wire · showcase
Spring improves singleton destruction caching, upgrades Elasticsearch and Boot deps
By RepoJournal · Filed · About Spring
Spring Framework improves singleton destruction handling while Spring Data Elasticsearch moves to 9.5.2 and Spring Kafka bumps Boot to 4.0.8.
Spring Framework switched to the singleton target as the cache key for destruction purposes [1], closing gh-37207. This means destruction caching now keys on the actual target bean, preventing mismatches when proxies or aliases are involved. Separately, a lock-guarded boolean field was reduced to a thread-local [2], closing gh-37199 and eliminating lock contention on that hot path. Spring Data Elasticsearch upgraded to Elasticsearch 9.5.2 [3], closing #3333, bringing the client in line with the latest server release. In the same vein, Spring Batch Extensions bumped spring-boot-starter-parent from 4.0.3 to 4.1.1 [4], and Spring Kafka updated its development dependencies, moving spring-boot-starter from 4.0.7 to 4.0.8 [5]. The Kafka build also tracks Spring Data's BOM from 2026.1.0-M1 to 2026.1.0-SNAPSHOT [6], keeping alignment with upcoming milestones. Finally, a flaky Spring Integration test was fixed [7]: the mocked MessageSource now properly terminates its polling sequence, so the test no longer fails on loaded CI runners.
Action items
- → Review singleton destruction behavior if you use custom destruction callbacks with proxies spring-projects/spring-framework [monitor]
- → Update to Spring Data Elasticsearch 9.5.2 if you track Elasticsearch versions spring-projects/spring-data-elasticsearch [plan]
- → Upgrade spring-boot-starter-parent to 4.1.1 in Spring Batch Extensions projects spring-projects/spring-batch-extensions [plan]
References
- [1] Use singleton target as cache key for destruction purposes ↗ spring-projects/spring-framework
- [2] Reduce lock-guarded boolean field to thread-local ↗ spring-projects/spring-framework
- [3] Upgrade to Elasticsearch 9.5.2. ↗ spring-projects/spring-data-elasticsearch
- [4] Bump `spring-boot-starter-parent` from 4.0.3 to 4.1.1 ↗ spring-projects/spring-batch-extensions
- [5] Bump org.springframework.boot:spring-boot-starter from 4.0.7 to 4.0.8 in the development-dependencies group ↗ spring-projects/spring-kafka
- [6] Bump org.springframework.data:spring-data-bom from 2026.1.0-M1 to 2026.1.0-SNAPSHOT ↗ spring-projects/spring-kafka
- [7] Fix flaky MockMessageSourceTests.testMockMessageSource() ↗ spring-projects/spring-integration