Chapter 8 presented all the available tools for migrating applications to modules. This chapter brings everything together in a case study. We’ll migrate a fully functional application that uses Spring and Hibernate to modules. Note that we’re deliberately using an example of “traditional” Spring/Hibernate development, instead of using the most modern way of doing things. We’re using pre-Java 9 versions, to create an interesting case study. Many applications have been written this way, which makes it extra interesting to see how these applications can be migrated toward the future. Newer versions of frameworks will support Java 9 better out of the box, and migrations based on these versions will probably be even easier. If you are not familiar with these frameworks, don’t worry. You don’t have to understand all the code and configuration to learn about common problems you may face during a migration toward modules.
You will get a lot more value out of this chapter if you check out the code repository and try to migrate the code while you’re reading the chapter. In the code repository, we have provided three versions:
The classpath version of the application before migration.
The migrated application.
The migrated application after additional modularization.
We recommend opening the spring-hibernate-starter project in an ...