Modules vs Layers in Java package structure
问题 I used to put everything in packages like this: com.company.app.module1 com.company.app.module2 But it has made package-based AOP pointcuts difficult, and resulted in huge packages that need an IDE to make sense of. So now I realize I need a deeper package structure, but I am constantly torn. Give modules preference, like this? com.company.app.module1.domain com.company.app.module1.logic com.company.app.module1.persistence com.company.app.module2.domain com.company.app.module2.logic com