In this video, I teach you how to create a modular application using Spring Boot and Java 14. ( You could do this with Java 9 as well but 14 is the latest :)) Enjoy! Code on GitHub: github.com/lsp...
Hello Laurentiu, did you notice any performance improvements regarding CPU and RAM consumption on a modular spring application vs a non modular spring application?
Hi Dan, Thanks for the question. Unfortunatelly I didn't do myself any research on this. I have no idea how much using modules would improve CPU and memory but for sure they're an excellent choice in decoupling the functionalities in the app and make it more maintainable as well as avoiding the usual classpath problems (NoClassDefFoundErrors and stuff)
@@laurspilca I also didn't expect any. But the project is not buildable from the command line. Is there sometnihg additional in pom file needed for modules?
Hi Ankit. It works the same as you see presented in this video :) Just change your Java version to 9 and of course you need to avoid using the var word which is available only starting with Java 10. But all the other aspects work the same.
Great video. Thanks. would like to suggest a good continuation of this video, another one that would include an example of CRUD with modules and testing. One module for entities, another for repositories and an example test using the repositories via modules.
Of course it can be implemented but I think that’s not a good example of using modules with Spring or Java. Use modules to form “Bounded context” separation instead like he did here with “invoicing” and maybe say another context call “order” in a online shopping application for example.