咨询JaVers 5.6.2兼容Spring Boot 2.x与Java 11的情况及版本规划
Great question—let’s walk through what you need to know for your migration:
1. Java 11 Compatibility of Latest JaVers Versions
Absolutely, the latest JaVers versions (7.x and above) fully support Java 11. In fact, JaVers officially added Java 11 compatibility starting with version 6.0, so any release from 6.0 onwards will work seamlessly with Java 11. You won’t hit any runtime or compilation issues related to Java version compatibility here.
2. Spring Boot 2.x Adaptation & Version Recommendations
JaVers maintains a dedicated Spring Boot starter that’s fully compatible with Spring Boot 2.x. Here’s a quick breakdown of version pairings to consider:
- For Spring Boot 2.7.x (LTS): Pair with JaVers 7.x (the current stable series) for the best compatibility and feature support.
- For older Spring Boot 2.x releases (2.3.x to 2.6.x): JaVers 6.x or 7.x will both work—7.x includes more bug fixes and enhancements, so it’s the better choice if your Spring Boot version allows it.
3. Migration Steps to Follow
To smooth your transition from Spring Boot 1.x + JaVers 5.6.2 to Spring Boot 2.x + Java 11:
- First, upgrade your project’s Java version to 11 and verify basic compilation/runtime works (fix any deprecated APIs or language features first).
- Upgrade Spring Boot to your target 2.x version (stick to LTS releases like 2.7.x for long-term support).
- Update your JaVers dependencies: replace the old
javers-spring-boot-starter(or core JaVers dependencies) with the latest compatible version (7.x recommended). - Review your JaVers configuration: Spring Boot 2.x changed some auto-config behaviors (like datasource initialization), but the JaVers starter adapts to these changes. Double-check any custom JaVers beans or properties to ensure they align with Spring Boot 2.x conventions.
- Run thorough tests on your audit functionality: verify entity change tracking, history queries, and any custom JaVers integrations still work as expected.
4. JaVers Version Roadmap for These Environments
JaVers actively maintains compatibility with all supported Spring Boot LTS versions and Java LTS versions (including 11 and 17). The team continues to release updates that align with Spring Boot’s latest stable releases, so you can expect ongoing support for Spring Boot 2.x + Java 11 for the foreseeable future.
内容的提问来源于stack exchange,提问作者Kedar Dixit

