Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Currently it isn't possible to translate all XML-based AspectJ settings to a Java based configuration. Probably it will never be. The main reason is that Java doesn't support method literals. But there is a workaround, which was first presented here: <a href="https://jira.springsource.org/browse/SPR-8148" rel="nofollow">https://jira.springsource.org/browse/SPR-8148</a></p> <blockquote> <ol> <li>Continue using <code>&lt;aop:config&gt;</code> by including the relevant XML snippet using <code>@ImportResource</code></li> <li>Convert any existing <code>&lt;aop:config&gt;</code> elements to use <code>@Aspect</code> style.</li> </ol> </blockquote> <p>Referring to the <a href="http://static.springsource.org/spring/docs/3.2.x/spring-framework-reference/html/aop.html#aop-ataspectj" rel="nofollow">documentation</a>, I would say that you're already nearly done with your configuration you have described above. You just have to change you config like this:</p> <pre><code>&lt;aop:config&gt; &lt;aop:advisor id="managerTx" advice-ref="txAdvice" pointcut="com.myapp.configuration.AspectConfig.serviceAnnotatedClass()" order="20" /&gt; &lt;/aop:config&gt; </code></pre> <p>Leave the rest like it is and import that resource:</p> <pre><code>import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; @Aspect @ImportResource("classpath:/aop-config.xml") public class AspectConfig { @Pointcut("@within(org.springframework.stereotype.Service)") public void serviceAnnotatedClass() {} } </code></pre> <p>I hope I could help...</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload