I have a project with the following xml configuration:
<aop:aspectj-autoproxy proxy-target-class="true"/>
<tx:annotation-driven transaction-manager="transactionManager" order="-2147483648"
proxy-target-class="true"/>
Now I have a Bean in particular that I would like to proxy using interfaces. I tried the following configuration:
@Component
@Scope(proxyMode = ScopedProxyMode.INTERFACES)
public class MySpecialBean implements SomeInterface {
@Transactional
public void ...
}
Regardless of having the @Scope annotation or not I get the same CGLib error complaining about not having a constructor with no arguments (the bean has constructor injected dependecies).
Is is possible to override the default proxy creation behavior?