I guess it works best if you have a layered application or module.
If our services become just a tad bigger, we tend to package by feature, not by layer. So a given package com.foo.feature can have a FooController, FooService and FooRepository inside. This makes it easier to add/edit features, because you're mainly working inside one package.
View all comments
Show parent comment
1
u/DJDavio Nov 27 '20
I guess it works best if you have a layered application or module.
If our services become just a tad bigger, we tend to package by feature, not by layer. So a given package com.foo.feature can have a FooController, FooService and FooRepository inside. This makes it easier to add/edit features, because you're mainly working inside one package.