Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8263489

Impossible/extremely difficult to modularize Spring Boot

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: External
    • Affects Version/s: 15
    • Fix Version/s: None
    • Component/s: tools
    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      generic

      Description

      A DESCRIPTION OF THE PROBLEM :
      I would like to be able to use jlink to create a modularized version of an application running Spring Boot.

      As described in this issue, after many many attempts I found it essentially impossible:

      https://github.com/wiverson/maven-jpackage-template/issues/8

      Issues I ran into:

      - Libraries that declared transitive dependencies in their module-info.java that wound up requiring now-removed modules (specifically, activation).
      - Confusing error messages throughout
      - Attempts to use jdeps to add module-info to existing libraries ran into many problems and errors, including circular references (e.g. slf4j -> logback -> slf4j)
      - Extraordinarily confusing terminology in practice and errors (e.g. static in modules has nothing to do with static in Java)

      I would suggest that the developer experience for jlink/jdeps be enhanced to make it possible for an end developer to be able to create a Spring Boot image trivially. The GraalVM and Spring Native projects are an effort to make small, cloud-friendly Spring Boot applications - https://github.com/spring-projects-experimental/spring-native - and jlink could be a solid competitive given additional investment in the developer experience.


        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: