In a Java Spring Boot project, which one is preferred more:
infrastructure ├── http │ ├── controllers │ │ └── OrderController.java │ └── requestdto │ └── order
or this one
infrastructure └── http └── order ├── OrderController.java ├── OrderRequestDto.java ├── OrderResponseDto.java └── OrderMapper.java
#Project structure question
5 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @marble hawk! Please use
/closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
I feel like the second structure is clearer but at the same time it's just throwing everything into the same bag
It depends on the size of the project and some other things.
If applicable, it often makes sense to split it by use cases (similar to how you would split microservices) but you can still use subpackages for different things (e.g. controllers and data/business logic)