$ the-wire · showcase
Spring Boot resolves @DefaultValue placeholders, Spring Batch deprecates JPA setters
By RepoJournal · Filed · About Spring · Composed from the cited sources · methodology
Spring Boot now resolves property placeholders in @DefaultValue annotations before conversion, and Spring Batch deprecates setEntityManagerFactory across its JPA item readers and writer.
Spring Boot constructor binding now resolves property placeholders in @DefaultValue annotations before converting arguments [1]. With defaults.duration=3d, a parameter annotated @DefaultValue("${defaults.duration:1d}") receives Duration.ofDays(3); without defaults.duration, it receives Duration.ofDays(1). The change was merged by Andy Wilkinson [2] and follows the team's earlier decision on placeholder resolution. Separately, RabbitDockerComposeConnectionDetailsFactory now resolves the address from container port 5671 when an SSL bundle is present, rather than 5672, so the TLS handshake no longer targets the plain AMQP listener [3].
Spring Batch deprecated setEntityManagerFactory in its JPA item readers and writer [4], and added flushing support to RepositoryItemWriter [5]. RepositoryItemWriter now accepts whole-chunk methods via setMethodName, such as JpaRepository#saveAllAndFlush, and exposes a protected flush() hook for repositories where saving and flushing are separate operations. The repository field is now protected so subclasses overriding flush() can access it. The async processing APIs moved to core [6], and a refinement to contribution #5409 updated Javadocs and reference docs and removed the sequence field from ChunkTaskExecutorItemWriter [7].
Spring AMQP fixed JacksonMessageConverter when assumeSupportedContentType is disabled [8]: contentType is now checked against supportedContentType instead of skipping the check entirely. Spring Session upgraded its samples to Spring Boot 4.2.0-M1, which also requires the latest Spring Framework 7.1.0 snapshot to address an HtmlUnit 5 incompatibility [9], and switched samples to the Boot-specified Jackson version [10]. Spring Tools disambiguated findNode matches and added an unwired plain-tree ascii renderer [11].
Action items
- → Review Spring Batch JPA item reader/writer configurations for setEntityManagerFactory before upgrading spring-projects/spring-batch [plan]
- → Upgrade spring-amqp to pick up the JacksonMessageConverter assumeSupportedContentType fix spring-projects/spring-amqp [plan]
- → Check RabbitMQ Docker Compose SSL bundle setups for the corrected TLS port 5671 resolution spring-projects/spring-boot [monitor]
References
- [1] Resolve property placeholders in constructor binding default values ↗ spring-projects/spring-boot
- [2] Merge pull request #51661 from Wanbinyu ↗ spring-projects/spring-boot
- [3] Use TLS port for Docker Compose RabbitMQ connection when SSL is configured ↗ spring-projects/spring-boot
- [4] Deprecate `setEntityManagerFactory` in JPA item readers/writer ↗ spring-projects/spring-batch
- [5] Add flushing support in RepositoryItemWriter ↗ spring-projects/spring-batch
- [6] Move async processing APIs to core ↗ spring-projects/spring-batch
- [7] Refine contribution #5409 ↗ spring-projects/spring-batch
- [8] GH-3641: Fix JacksonMessageConverter for assumeSupportedContentType ↗ spring-projects/spring-amqp
- [9] Upgrade to Spring Boot 4.2.0-M1 ↗ spring-projects/spring-session
- [10] Use Boot-specified Jackson Version for Samples ↗ spring-projects/spring-session
- [11] GH-1974: disambiguate findNode matches and add an unwired plain-tree ascii renderer ↗ spring-projects/spring-tools