r/SpringBoot • • Sep 29 '24

Package structure

Post image

What do you think about this package structure? What packages or layers would you add or remove if you work with microservices architecture?

43 Upvotes

43 comments sorted by

View all comments

Show parent comments

0

u/HappyPurchase72 Sep 29 '24

Thanks for the comment, I think it's a good structure to start with, I'll take into account the interface prefix. Personally I like to separate interfaces and implementations to have a better understanding of the structure.

4

u/WaferIndependent7601 Sep 29 '24

If you think that it’s a good structure and don’t want to change anything: why are you asking?

0

u/HappyPurchase72 Sep 29 '24

I think it's a good basic structure to start with, but I had doubts about how the packages were organized, anyway, thank you very much for your time 😎

2

u/WaferIndependent7601 Sep 29 '24

No. The structure is very bad. Im serious.

1

u/HappyPurchase72 Sep 29 '24

I understand. What structure model could you recommend that takes into account maintenance and changing requirements based on the specific needs of the company? I ask because I am in the design process with the company and I want each microservice to be scalable.

3

u/Jeevigyan-vala Sep 29 '24

Why did you decide on microservices? IMO you should default to a monolith and only do microservices if you can justify it

2

u/WaferIndependent7601 Sep 29 '24

Modulith, not monolith 👍

1

u/HappyPurchase72 Sep 29 '24

I'm considering microservices for my project to ensure scalability and modularity as it grows. I’d appreciate any insights or experiences you have regarding when it’s justified to switch from a monolith to microservices.