-
Notifications
You must be signed in to change notification settings - Fork 41.1k
Spring Boot Java 9+ modularity #13799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We don't have any plans to modularise Spring Boot any further as we've yet to see a compelling use-case for doing so. Given that your application is going to be deployed as a single unit, what benefits do you see from splitting it into separate Jigsaw modules? I'm particularly interested in any benefits that can't be achieved with separate packages, package-private visibility and, perhaps, separate Maven/Gradle projects. Our recommendation is that, when using Java 9+, you take advantage of the JDK's modularity while using the classpath (rather than the module path) via |
I think this is not so useless features:
There may be more benefits that I don't see, but of course, modularizing may cost very expensive. |
Thanks. In our experimentation, the benefits of JLink have been rather underwhelming. Exploratory work being done with GraalVM suggests that it's a far more promising approach, both in terms of binary size and startup performance. There's a Spring Framework issue tracking support for Graal native images. The problem you describe with Elasticsearch is, as I understand it, why the dropped support for embedding Elasticsearch. That is to say, I don't think believe Jigsaw to be the answer to their classpath problems. I'm going to close this one as, at this time, we don't plan to do anything more in this area. We can perhaps revisit this in the future if the ecosystem starts to move towards Jigsaw and Spring Framework moves beyond automatic modules. |
I want to build java 9+ modular (Jigsaw) application using Spring Boot. Currently it is not possible: suppose we have application which consist of main and web modules. I'm expecting that
But it will not work because Spring Boot has hard coded dependency on spring-web, so class loading will fail in such hierarchy. I will have to move Spring Web dependency from web module to main module but such modularity makes no sense for application.
Do you have plans to modularize Spring Boot and Spring projects in general?
The text was updated successfully, but these errors were encountered: