Q: Which special type of advice is used to implement an interface?
Solution: It allows your objects to implement an interface dynamically by providing an implementation class for that interface.
Q: How does an Introduction advice do this in Spring?
Solution: Introduction works by adding an interface to the dynamic proxy.
Q: Annotation used to declare an introduction
Solution: In this aspect, you can declare an introduction by annotating an arbitrary field with the @DeclareParents annotation.
Q: Attribute used to specify implementation class
Solution: The interface to introduce is determined by the type of the annotated field. Finally, the implementation class used for this new interface is specified in the defaultImpl attribute.
Q: How to keep track of the usage of your beans
Solution: You can introduce a new interface to your objects with an implementation class that holds the state field.
Q: How to introduce counter field to original bean class?
Solution: Since there is no field for storing the counter value in the original classes, you need to introduce one with Spring AOP.
Q: Tag used to declare aspects
Solution: In the bean configuration file, all the Spring AOP configurations must be defined inside the aop:config element.
Q: Tag used to enable AspectJ annotation?
Solution: To enable AspectJ annotation support in Spring, you have already defined an empty XML element, aop:aspectj-autoproxy.
Q: Tag which defined Spring AOP configurations
Solution: In the bean configuration file, all the Spring AOP configurations must be defined inside the aop:config element.
Q: What are the ways to declare an advice?
Solution: An advice element requires either a pointcut-ref attribute to refer to a pointcut or a pointcut attribute to embed a pointcut expression directly.
You Have Score    | /10 |