marjanovicbrane/spring-crm-web-app-aop
We created spring CRM web app with AOP.This app have standard 3 LAYERS.CONTROLLER, DAO and SERVICE.All 3 layers are the same as before.We also have entity class Customer, which is the same as before.We have 2 JSP pages customer-form and list-customers with css.Our index.jsp page will automatically start, when we run our app.Only difference in this app is that, because here we don't using PURE JAVA CONFIG, we are using here XML CONFIG.We have 2 xml files, spring-mvc-crud-demo-servlet.xml and web.xml.We created new class AopExpressions.This class will hold us pointcut declarations.We are going to combined pointcut declarations, because we want to have matching for these only 3 packages:controller, service, dao.We can now use and share this same pointcut declaration in some other classes.We created a new class CRMLoggingAspect.We created ASPECT CLASS.In this class we was using @Before ADVICE TYPE with COMBINED POINTCUT DECLARATION forAppFlow() from class AopExpression.JoinPoint will give us meta data about our target method(method signature).We also added a new ADVICE TYPE @AfterReturning in the class CRMLoggingAspect.Method with this advice returns values(objects) of the calling method.Now we can run our CRM WEB APP and see those 2 ADVICES TYPE, because we are using logger to show what is happening in the background of the app.
Java
No issues in this repository yet.