Timeline for Structure of RESTful Service with Java Spring for Beginner
Current License: CC BY-SA 3.0
15 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 29, 2019 at 16:48 | comment | added | Edwin Diaz | You write a lot about modules but in the generic/high-level sense. At the time that this question was answered, Java 9 modules weren't introduced yet. Do you want to elaborate a little bit on how the packaging & structure would work if you have Java 9 modules in mind? | |
| Sep 16, 2017 at 18:13 | comment | added | Foolish | @minjun-yu can you please provide example on how to write JUnit test cases for service and dao layer. I have similar structure in Springboot. | |
| Mar 8, 2017 at 7:37 | comment | added | Glenn Van Schil | @MinjunYu Thank you for the clear explanation. The problem I had was that I wrapped my parent dependencies inside a dependency Manager therefor I had to inherit the dependencies I needed in my child poms. | |
| Mar 7, 2017 at 16:04 | comment | added | Alex Minjun Yu | @GlennVanSchil If you put all the spring maven dependencies in the pom.xml of the parent module, then there is not need to add any spring related dependencies in child modules (repo/service modules). This is just one way to layout multi modules projects in spring. The purpose is to organize your code. If your project is not that big and will not change in the foreseeable future, you can combine the domain,repo,service in the same module called "core". It looks even cleaner. | |
| Mar 7, 2017 at 7:18 | comment | added | Glenn Van Schil | @MinjunYu Thanks for the clear answer! But your repo/service does need spring as maven dependency for the Service, Repository or Component annotations am I right? | |
| Mar 6, 2017 at 20:04 | comment | added | Alex Minjun Yu |
@GlennVanSchil No, it does not have to be Spring projects b/c when the whole project is built, repo/service layer will be included in the classpath. The @Autowire will work as a result.
|
|
| Mar 6, 2017 at 17:28 | comment | added | Glenn Van Schil | Will the Service and Repository modules be Spring projects as well? | |
| Nov 30, 2016 at 6:41 | history | edited | Alex Minjun Yu | CC BY-SA 3.0 |
added 168 characters in body
|
| Jul 16, 2016 at 19:15 | history | edited | Alex Minjun Yu | CC BY-SA 3.0 |
deleted 4 characters in body
|
| Jul 14, 2016 at 15:57 | vote | accept | aCarella | ||
| Jul 11, 2016 at 16:32 | history | edited | Alex Minjun Yu | CC BY-SA 3.0 |
Fix typo
|
| Jul 1, 2016 at 7:24 | comment | added | Andy | Domain is usually the layer containing business logic. Domain is usually also refered to as the layer containing services. Domain objects are not plain POJOs, Domain object should contain business logic such as argument validation and as such. It would probably be better to rename the layer to something else. Repository layer is also quite often used to transfer data from multiple sources to your domain objects. | |
| Jul 1, 2016 at 5:33 | history | edited | Alex Minjun Yu | CC BY-SA 3.0 |
added 185 characters in body
|
| Jul 1, 2016 at 5:04 | review | First posts | |||
| Jul 11, 2016 at 16:19 | |||||
| Jul 1, 2016 at 5:03 | history | answered | Alex Minjun Yu | CC BY-SA 3.0 |