NameMatchMethodPointcut Class In Spring AOP

Spring » on Sep 21, 2012 { 5 Comments } By Sivateja

NameMatchMethodPointcut class is going to verify whether the method names of a spring bean class are matching with the given criteria or not.  While configuring this pointcut class into xml, we use mappedName or mappedNames property of the class into xml file. This class is a predefined class, so we need to configure the class directly into xml file like..

<bean id="id1" class="">
    <property name="mappedName">

Means the pointcut class identifies that setter methods of the bean class are eligible for getting advices.  If there is no commonalities in method names we can provide individual method names by configuring mappedNames property.

mappedNames is the collection type List :-), so we need <list>—-</list> element while configuring the collection, hmm some thing..

<bean id="id1" class="">
    <property name="mappedNames">

According to above configuration,  method names with method1, method2, method3 are only eligible to get advices, we will see the example in the next article, stay tuned.


You Might Also Like

  ::. About the Author .::

Sivateja Kandula - Java/J2EE Full Stack Developer
Founder of Java4s - Get It Yourself, A popular Java/J2EE Programming Blog, Love Java and UI frameworks.
You can sign-up for the Email Newsletter for your daily dose of Java tutorials.


5 Responses to “NameMatchMethodPointcut Class In Spring AOP”
  1. your website tutorial very its easily understand.i am beginning level its very useful for me .thank u very much…….

  2. sanjeev says:

    sir, waiting for the next article…
    examples on pointcut

  3. siri says:

    Awesome tutorial

  4. subha says:

    when i give method names in a list for mappedNames i get an exception like this.”java.lang.IllegalStateException: Cannot convert value of type [java.util.ArrayList] to required type [java.lang.String] for property ‘mappedName'”

  5. Girinaidu says:

    Bayya nuv keka


By posting your answer, you agree to our comments policy.
Most Recent Posts from Top Categories
Spring Boot Hibernate Spring
Contact | About Us | Privacy Policy | Advertise With Us

© 2010 - 2024 Java4s - Get It Yourself.
The content is copyrighted to Sivateja Kandula and may not be reproduced on other websites.