I'm not yet too familiar with Java modules, but want to dive in a bit deeper. However, when modularizing an existing application, two questions arise for me:
- How do I know what exact modules my application has to require?
- How do I know if a certain package is contained in a module and if so, what is its name?
Take the example of a plain, empty Spring Boot project with Spring Reactive Web dependency. By default, only these two classes are imported:
org.springframework.boot.SpringApplication;
org.springframework.boot.autoconfigure.SpringBootApplication;
Now how do I know (1) if these classes are part of any module at all (in the case of Spring they for sure are) and (2) what exact modules I need to require in module-info.java?