Refer to the "Java Module System" instead of "Jigsaw"

This commit is contained in:
Sam Brannen
2024-08-22 13:00:39 +02:00
parent c5f51aab67
commit cac623b3f4
5 changed files with 26 additions and 24 deletions

View File

@@ -317,8 +317,8 @@ exposed based on security policies in some environments -- for example, standalo
JDK 1.7.0_45 and higher (which requires 'Trusted-Library' setup in your manifests -- see
{stackoverflow-questions}/19394570/java-jre-7u45-breaks-classloader-getresources).
On JDK 9's module path (Jigsaw), Spring's classpath scanning generally works as expected.
However, make sure that your component classes are exported in your `module-info`
On the module path (Java Module System), Spring's classpath scanning generally works as
expected. However, make sure that your component classes are exported in your `module-info`
descriptors. If you expect Spring to invoke non-public members of your classes, make
sure that they are 'opened' (that is, that they use an `opens` declaration instead of an
`exports` declaration in your `module-info` descriptor).

View File

@@ -905,8 +905,8 @@ policies in some environments -- for example, stand-alone applications on JDK 1.
and higher (which requires 'Trusted-Library' to be set up in your manifests. See
{stackoverflow-questions}/19394570/java-jre-7u45-breaks-classloader-getresources).
On JDK 9's module path (Jigsaw), Spring's classpath scanning generally works as expected.
Putting resources into a dedicated directory is highly recommendable here as well,
On the module path (Java Module System), Spring's classpath scanning generally works as
expected. Putting resources into a dedicated directory is highly recommendable here as well,
avoiding the aforementioned portability problems with searching the jar file root level.
====

View File

@@ -37,12 +37,12 @@ support for different application architectures, including messaging, transactio
persistence, and web. It also includes the Servlet-based Spring MVC web framework and, in
parallel, the Spring WebFlux reactive web framework.
A note about modules: Spring's framework jars allow for deployment to JDK 9's module path
("Jigsaw"). For use in Jigsaw-enabled applications, the Spring Framework 5 jars come with
"Automatic-Module-Name" manifest entries which define stable language-level module names
("spring.core", "spring.context", etc.) independent from jar artifact names (the jars follow
the same naming pattern with "-" instead of ".", e.g. "spring-core" and "spring-context").
Of course, Spring's framework jars keep working fine on the classpath on both JDK 8 and 9+.
A note about modules: Spring Framework's jars allow for deployment to the module path (Java
Module System). For use in module-enabled applications, the Spring Framework jars come with
`Automatic-Module-Name` manifest entries which define stable language-level module names
(`spring.core`, `spring.context`, etc.) independent from jar artifact names. The jars follow
the same naming pattern with `-` instead of `.` for example, `spring-core` and `spring-context`.
Of course, Spring Framework's jars also work fine on the classpath.