title: AOP for authentication in java
body: <p>I am keeping looking for an authencitation solution in java until I found AOP.</p>
  
  <p>It seesm that the advise of the AOP can act as an interceptor of the required method executation. Which can be use or authentication and authorization.</p>
  
  <p>And I have heard some solutions based on URL filtering, but IMO, the AOP is better since it will intercepte the logic rather then the request path.</p>
  
  <p>Especially in an application which have multiple views like this:<img src="https://i.stack.imgur.com/CdcOO.png" alt="example">, </p>
  
  <p>we can use only one authentication module to hold the whole application through AOP, but if we use the URL filtering, we have to make another authentication module for the "Client GUI View".</p>
  
  <p>This is my opinion, I am not sure if this is right, please figure it out if I miss something.</p>
  
  <p>And BTW, is there a live exmaple about AOP with authentication(Spring AOP is better)?</p>