Error at:: 0 formal Unbound in pointcut

Source: Internet
Author: User

In AOP programming using declarative methods, you encounter the following two issues, which are resolved as follows :

(1)error at ::0 formal Unbound in pointcut

Workaround : Remove the parameters in the function notification function, for example :

@Before ("Execution" (public void COM. BJSXT. DAO. Impl. Userdaoimpl. *(. .))")

Public void Beforemethod (method method) {

System. out . println ("method before");

}

Switch

@Before ("Execution" (public void COM. BJSXT. DAO. Impl. Userdaoimpl. *(. .))")

Public void Beforemethod () {

System. out . println ("method before");

}

This solution can solve the problem, but has not understood, I hope someone can help solve

(2)error at ::0 can ' t find referenced pointcut MyMethod

Cause of error : If you are using a JDK version of 1. 6 words, while the quoted Aspectjrt. The jar is spring-2. This error is reported in the case of jar packages contained in 0.
The workaround : Download the latest ASPECTJRT jar package to aspectj-1. 6. 6. jar, or use Spring3. 0 in the package!


Error at:: 0 formal Unbound in pointcut

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.