-1

In a spring boot application I see a domain folder which includes EntityName, EntityNameSomeDetails, SomeEntityNameResponse, etc. I am not finding a proper documentation about this sort of architecture.

here is an example if domain folder that I am not clear what is the purpose of its each file. What classes I have to write there? What methods and variables I have to keep there, etc.

https://github.com/bigzidane/springboot-rest-h2-swagger/tree/master/src/main/java/com/es/challenge/domain

DragonKnight
  • 1,740
  • 2
  • 22
  • 35

3 Answers3

2

Usually a domain folder contains POJOs (Plain Old Java Objects). This folder basically stores classes that might or might not be entities, but follow a common structure:

  1. fields
  2. construstors
  3. getters and setters
Frank
  • 112
  • 9
1

The domain folder looks very much like the entity folder. Maybe it's just a different folder name given.

Rahul SK
  • 350
  • 3
  • 23
1

I think what you are actually looking for is the Spring boot project structure,which may not be the standard for every company/project,but Here is one of many standards

The project structure in the image is done by considering this. Let me know:)

DevApp
  • 55
  • 1
  • 7
  • that's an understanding structure. however the one I'm looking into has a domain folder which I am not clear about its content. – DragonKnight Jul 10 '19 at 06:52
  • 1
    By looking at the structure of the folder you have provided,I think the developer as written all the Entity,DTOs,Request and Response objects in the same package but which is not feasible because as the project grows and number of entities,DTOs,Req and Resp object increases,it will be hard to maintain. – DevApp Jul 10 '19 at 07:01