Results 1 to 2 of 2

Thread: Howto write the expression in a <aop:pointcut>?

  1. #1

    Default Howto write the expression in a <aop:pointcut>?

    Hi,

    I can write a <aopointcut> like this:
    Code:
    <aop:pointcut id="nodeDaoMethods" expression="execution(* com.m.ll.lldao.impl.NodeDaoImpl.*(..))" />
    I want to specify some particular methods of the NodeDaoImpl class in the expression (the method names have nothing in common, i.e. if regular expression is used, a regular expression for those names is x | y | z, where x, y, z are method names). How could I do that?

    Regards.

  2. #2
    Join Date
    Sep 2007
    Location
    Oceanside, CA
    Posts
    187

    Default

    If I understand the question correctly, you could do something like:

    Code:
    <aop:pointcut id="nodeDaoMethods" expression="execution(* com.m.ll.lldao.impl.NodeDaoImpl.x(..)) || execution(* com.m.ll.lldao.impl.NodeDaoImpl.y(..)) || execution(* com.m.ll.lldao.impl.NodeDaoImpl.z(..))" />
    Mike Bingham

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •