Julio leopard banderas wrote:Hey,
i heared about AOP in Spring, but i still confusing the concept of AOP and his utility in Spring,
can anyone give us the concept and the utility to use AOP ?
thanks
Hi Julio,
I too learning AOP in Spring these days, I can help you in understanding what AOP is and its utility in any web application.
Suppose you have a class say Audience and in that class you have methods say
1) takeSeats()
2) switchOffMobile()
3) appluad()
Also you have a pojo class say Compititor which is having fields Name and Instrument
we have a class ShowStarting which look like this once you initialized bean for Competitor and Audience
You can eliminate these cross cutting concerns and allow Spring to handle these. This is one of the advantage of AOP.
These cross cutting concerns you have to write in an xml to tell spring when and where to call them.