Hallo,
what should be changed in configuration for AspectJ Load-time Weaving to start using cglib proxy ?
configuration
http://www.springbyexample.org/examp...ng-config.html
:
Code:<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> <context:load-time-weaver /> <bean id="processor" class="org.springbyexample.aspectjLoadTimeWeaving.Processor" /> </beans>whole project is available at:Code:@Aspect public class PerformanceAdvice { @Pointcut("execution(public * org.springbyexample.aspectjLoadTimeWeaving..*.*(..))") public void aspectjLoadTimeWeavingExamples() { } @Around("aspectjLoadTimeWeavingExamples()") public Object profile(ProceedingJoinPoint pjp) throws Throwable { final Logger logger = LoggerFactory.getLogger(pjp.getSignature().getDeclaringType()); StopWatch sw = new StopWatch(getClass().getSimpleName()); try { sw.start(pjp.getSignature().getName()); return pjp.proceed(); } finally { sw.stop(); logger.debug(sw.prettyPrint()); } } }
http://www.springbyexample.org/examp...reference.html
I would like to look at
aspectj ltw,
cglib proxy,
and JDK dynamic proxy,
but I don't know how to make spring use cglib proxy.
I tried adding
and/orCode:<aop:aspectj-autoproxy proxy-target-class="true"/>
and als added CGLIB 2 binaries on my classpathCode:<aop:config proxy-target-class="true"> <!-- other beans defined here... --> </aop:config>
as written on http://static.springsource.org/sprin...rence/aop.html
but it didn't work
thanks for help


Reply With Quote
