Spring Configuration
mkzaker opened this issue · 1 comments
Hi
Which module to put common spring configurations such as security and JPA auditing?
JPA auditing has to be placed into the persistence adapter because it needs to know that you're using JPA.
As for security, it depends on where you want to apply security.
If you want to apply security on the web level, you can include it into the web adapter. This way, you could protect your REST endpoints, for example, and ignore security in the business layer.
If you want to apply security within the business layer, for example to protect certain sensitive business methods, then you could include it into the application layer. Or, you can use aspect-oriented programming to "weave" it into the business code, so that the business code stays clean of security concerns. The aspects could then be placed into the configuration module or a specific security module.