
Example and Steps for Creating Advice-3
Step6:-Create the Class which will call get the object and call the advised method.
package com.visualbuilder.aop; |
Output:-
The following output will be genertaed on screen when we run the above program.
Sep 19, 2008 12:37:02 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@133f1d7: display name [org.springframework.context.support.ClassPathXmlApplicationContext@133f1d7]; startup date [Fri Sep 19 12:37:02 IST 2008]; root of context hierarchy
Sep 19, 2008 12:37:02 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [com/visualbuilder/aop/beans.xml]
Sep 19, 2008 12:37:02 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO: Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext@133f1d7]: org.springframework.beans.factory.support.DefaultListableBeanFactory@2bb514
Sep 19, 2008 12:37:02 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@2bb514: defining beans [service,advice,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.aop.aspectj.AspectJPointcutAdvisor#0,beforeMethodExecution]; root of factory hierarchy
This is the before method of Advice Class
This is the Test Advice Method
Java Discussion
- - Difference between BMT an
- - Replace getParameterValue
- - Interviewing Next week -
- - Sudoku solver
- - Setting tab order in swin



