Guest User

Untitled

a guest
Nov 21st, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. <beans xmlns="http://www.springframework.org/schema/beans"
  2. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
  3. xmlns:util="http://www.springframework.org/schema/util"
  4. xsi:schemaLocation="
  5. http://www.springframework.org/schema/beans
  6. http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
  7. http://www.springframework.org/schema/tx
  8. http://www.springframework.org/schema/tx/spring-tx-3.1.xsd>
  9. .......
  10.  
  11. <tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true" order="[Order for @Transactional]">
  12. <beans/>
  13.  
  14. import org.aspectj.lang.ProceedingJoinPoint;
  15. import org.aspectj.lang.annotation.Around;
  16. import org.aspectj.lang.annotation.Aspect;
  17.  
  18. import org.springframework.core.Ordered;
  19.  
  20. @Aspect
  21. public class CustomAspect implements Ordered {
  22.  
  23. @Around(value = "@annotation(CustomAnnotation)")
  24. public Object aroundAdvice(ProceedingJoinPoint joinPoint) throws Throwable {
  25. ...
  26. }
  27. ....
  28.  
  29. @Override
  30. public int getOrder() {
  31. return [Order for @CustomAnnotation];
  32. }
  33.  
  34. ....
  35.  
  36. }
Add Comment
Please, Sign In to add comment