spring - Spring项目的Java 9 Jigsaw(模块)有什么计划吗?

标签 spring spring-boot java-9 java-platform-module-system java-module

Java 9 计划很快发布(7 月 27 日)。是否有计划发布符合 Java 9 的模块化 Spring 项目版本(Java 9 项目 Jigsaw)?

最佳答案

关注 module-info.javaDeclare Spring modules with JDK 9 module metadata发出最后一次提交:

This issue is marked as "General Backlog", indicating that we won't deal with it for 5.1 (otherwise it'd be marked for 5.1 GA still) and probably not in subsequent 5.x releases either (otherwise it'd be marked as "5.x Backlog").

Specifically, we can't ship module-info files quite yet since we'd need stable module names for all of our optional dependencies... and many of those don't declare stable module names at this point (that is, they don't even include an Automatic-Module-Name manifest entry in their jar). Also, we'd need to build the entire framework on JDK 9+ for the compiler to understand the module-info.java format which is not entirely trivial either, even if the framework itself is known to work fine with JDK 9/10/11 at runtime.

All in all, my prediction about module-info files for 5.1 turned out to be too ambitious. Our current focus is on general JDK 11 compatibility (SPR-16391) on the classpath and as automatic modules on the module path, as well as GraalVM compatibility (SPR-16991). The use of jlink requires manual addition of module-info.class files to the framework jars for the time being... which might stay that way for several years still until we ship a JDK 11 baselined Spring Framework 6.0 against a new generation of dependencies.

关于spring - Spring项目的Java 9 Jigsaw(模块)有什么计划吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43685081/

相关文章:

java - 从 python/django 学习 java/spring

java - 使用 Spring 在 Swagger UI 上收到 404 错误

java - 流 takeWhile 用于同一管道中的排序流

java - 从 Java 8 迁移到 Java 11。在运行时,是否可以从 Java 8 中编译的库中的类文件访问 JDK 内部 API?

Spring/Hibernate - 手动验证组并返回 BindingResult

java - 存在循环 bean 依赖时 Spring Bean 创建的随机性

java - 如何在 Spring Boot 中获取索引的 json 作为响应?

java - 在运行时检查 --module-path 值

spring - 如果我在spring boot应用程序中未指定任何版本,gradle将下载哪个版本?

mysql - 如何在不依赖数据库的情况下启动 spring-boot 应用程序?