<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: AOP Aspect not working in CRM and CX Q&amp;A</title>
    <link>https://community.sap.com/t5/crm-and-cx-q-a/aop-aspect-not-working/qaa-p/12068160#M407754</link>
    <description>&lt;P&gt;Please provide point cut and expression="execution(&lt;EM&gt; de.hybris.platform.commercefacades.order.impl.&lt;/EM&gt; .getCheckoutCart())" and try or else Use Runtime AOP :like&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt; &amp;lt;bean id='populateBillingAddressAspect' class="com.b2baddon.aop.AddBillingAddressToCartDataAspect" &amp;gt;
     &amp;lt;property name="cartService" ref="cartService"/&amp;gt;
     &amp;lt;property name="addressConverter" ref="addressConverter"/&amp;gt;
 &amp;lt;/bean&amp;gt;
 &amp;lt;aop:config proxy-target-class="true"&amp;gt;
     &amp;lt;aop:pointcut id="dataPopulatePoint"  expression="execution(* de.hybris.platform.commercefacades.order.impl.* .getCheckoutCart())" /&amp;gt;
     &amp;lt;aop:aspect ref="populateBillingAddressAspect"&amp;gt;
         &amp;lt;aop:around pointcut-ref="dataPopulatePoint" method="populate" /&amp;gt;
     &amp;lt;/aop:aspect&amp;gt;
 &amp;lt;/aop:config&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 26 Jun 2019 13:20:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2019-06-26T13:20:08Z</dc:date>
    <item>
      <title>AOP Aspect not working</title>
      <link>https://community.sap.com/t5/crm-and-cx-q-a/aop-aspect-not-working/qaq-p/12068159</link>
      <description>&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Aspect Class:&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt; @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");
     }
     
 }

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;aop.xml:&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt; &amp;lt;weaver options="-Xset:weaveJavaxPackages=true"&amp;gt;
     &amp;lt;include within="de.hybris.platform.core.model.user.." /&amp;gt;
     &amp;lt;include within="src.myextension.core.customer.." /&amp;gt;
 &amp;lt;/weaver&amp;gt;
 &amp;lt;aspects&amp;gt;
     &amp;lt;aspect name="src.myextension.core.customer.CustomerCustomAspect" /&amp;gt;
 &amp;lt;/aspects&amp;gt;


&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;local.properties&lt;/STRONG&gt;
-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&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 14:23:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/crm-and-cx-q-a/aop-aspect-not-working/qaq-p/12068159</guid>
      <dc:creator>former_member1244971</dc:creator>
      <dc:date>2019-06-21T14:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: AOP Aspect not working</title>
      <link>https://community.sap.com/t5/crm-and-cx-q-a/aop-aspect-not-working/qaa-p/12068160#M407754</link>
      <description>&lt;P&gt;Please provide point cut and expression="execution(&lt;EM&gt; de.hybris.platform.commercefacades.order.impl.&lt;/EM&gt; .getCheckoutCart())" and try or else Use Runtime AOP :like&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt; &amp;lt;bean id='populateBillingAddressAspect' class="com.b2baddon.aop.AddBillingAddressToCartDataAspect" &amp;gt;
     &amp;lt;property name="cartService" ref="cartService"/&amp;gt;
     &amp;lt;property name="addressConverter" ref="addressConverter"/&amp;gt;
 &amp;lt;/bean&amp;gt;
 &amp;lt;aop:config proxy-target-class="true"&amp;gt;
     &amp;lt;aop:pointcut id="dataPopulatePoint"  expression="execution(* de.hybris.platform.commercefacades.order.impl.* .getCheckoutCart())" /&amp;gt;
     &amp;lt;aop:aspect ref="populateBillingAddressAspect"&amp;gt;
         &amp;lt;aop:around pointcut-ref="dataPopulatePoint" method="populate" /&amp;gt;
     &amp;lt;/aop:aspect&amp;gt;
 &amp;lt;/aop:config&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Jun 2019 13:20:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/crm-and-cx-q-a/aop-aspect-not-working/qaa-p/12068160#M407754</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-06-26T13:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: AOP Aspect not working</title>
      <link>https://community.sap.com/t5/crm-and-cx-q-a/aop-aspect-not-working/qaa-p/12068161#M407755</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;You may try to change Pointcut like below.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;     @Pointcut("execution(* de.hybris.platform.core.model.user.CustomerModel*.getCard(..))") 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;CODE&gt;&lt;BR /&gt;&lt;/CODE&gt;</description>
      <pubDate>Thu, 03 Nov 2022 13:16:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/crm-and-cx-q-a/aop-aspect-not-working/qaa-p/12068161#M407755</guid>
      <dc:creator>former_member629830</dc:creator>
      <dc:date>2022-11-03T13:16:31Z</dc:date>
    </item>
  </channel>
</rss>

