![]() ![]() Every module has a adle file, and there is a global build- and settings-file. I want to build the application with gradle and use the gradle wrapper. But right now, I just want to get the react app to work, so this is enough (or maybe even over-engineered, as some would say).Ī more complete picture of the basic structure is: Later, I will need more modules for REST APIs, backend functionality, and so on. Web-frontend contains the Spring WebMVC classes, static files and javascript code. ![]() I’ll try to keep the code in this module to a minimum. This allows me to keep dependencies between other modules low, and to even apply the dependency inversion principle for modules.Ĭommon is basically a dumping ground for code that all (or most) modules need, and where I didn’t find a better module name yet. It also has a dependency on all other modules to be able to run the whole application. It contains the class ( "WebApplication" in this case) and the application.properties. Spring-boot-webapp is the actual application. So my basic module structure for this project is: Nowadays I tend to split even the simplest project in multiple modules (I am using the IntelliJ IDEA jargon here) to make it easier to manage dependencies later when they grow. This guide is just here to explain why the code is how it is right now, and how all the parts play together. Note: If you just want to play around with what I did, don’t repeat all my steps, clone my github project. Here is a really detailed guide that describes what I did to make it work (and often why I did it)… You can get the whole source code on GitHub: dtanzer/example-react-spring-boot. So I started to set up a little project where I can play around: A spring boot backend and a client application written with react and redux. Right now, I am trying to deepen my react knowledge and skills. ![]()
0 Comments
Leave a Reply. |