assuming that you have a typical module (repositor...
# announcements
b
assuming that you have a typical module (repository, model, config and other stuff) do you expose the model class (the one you use in repo) or a DTO through a service/facade?
also, in a spring project would you place the controller in this module or in some view specific module (in case of spring it would contain bean definitions etc)
c
Usually one entity from repository can be mapped to several DTOs, or one DTO can be composed from several entities, so we tend to expose DTOs, not entities. Another thing is that when JPA is usued, usually entities are managed beans, it's seldom a good idea to expose them to web layer directly.
❤️ 1