简体   繁体   中英

How to view aspect affected Java classes in IntelliJ IDEA 12?

Is there some way to see the aspect affected (advised) Java methods in IntelliJ IDEA?

Like XRef in Eclipse?

外部参照

Edited:

@Xiujun_Ma showed the feature exists, but I don't know what is not working. I'm using the libs and the facets on the project.

Libs:

库

Facets:

刻面

In your aspect class you will see like this:在此处输入图片说明

click the ball after line number (navigate to advised methods),

then, you will see aspect affected methods.

Yes, it is shown as you can see from @XiujunMa answer. It also works in 11.1.3. Used to navigate to the transaction affected methods in Spring.

To be able to use the AspectJ support in IntelliJ IDEA, you have to make sure that the following plugins are enabled:

 Spring-AOP and @AspectJ Support. AspectJ Support.

In addition to that, you should also create a library for aspectjrt.jar.

You probably need to use <aop:config> in the spring configuration to define <aop:pointcut . Then use <aop:advisor to map that pointcut and advice reference. You could also put the <aop:aspect there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM