on 2019 Jun 21 3:23 PM
Hi All, I wrote an aspect to intercept customer model method. Here is the code. I don't see the aspect method getting called. Please correct me if i am doing wrong.
Aspect Class:
@Aspect
@Component
public class CustomerCustomAspect{
@Pointcut("execution(* de.hybris.platform.core.model.user.CustomerModel.getCard(..))")
public void theExample() {
//
}
@Around("theExample()")
public void getCard(ProceedingJoinPoint joinPoint) throws Throwable {
joinPoint.proceed();
System.out.println("********************************came");
}
}
aop.xml:
<weaver options="-Xset:weaveJavaxPackages=true">
<include within="de.hybris.platform.core.model.user.." />
<include within="src.myextension.core.customer.." />
</weaver>
<aspects>
<aspect name="src.myextension.core.customer.CustomerCustomAspect" />
</aspects>
local.properties -javaagent:./bin/platform/ext/core/lib/aspectjweaver-1.9.0.RC2.jar -Dorg.aspectj.tracing.enabled=false -Daj.weaving.verbose=false -Dorg.aspectj.weaver.showWeaveInfo=false
Request clarification before answering.
Hello,
You may try to change Pointcut like below.
@Pointcut("execution(* de.hybris.platform.core.model.user.CustomerModel*.getCard(..))")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.