I have a repository class that is created in XML like so:
<bean id="stuffRepositoryTarget" class="my.stuff.RepositoryImpl">
<!-- some params -->
</bean>
<bean id="stuffRepository" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean" primary="true">
<property name="target" ref="stuffRepositoryTarget" />
<property name="transactionAttributes">
<prop key="*">PROPAGATION_REQUIRED</prop>
</property>
</bean>
And then I have a class that uses the repository like this:
@Autowired Repository repository;
It appears that the @Autowired annotation is referring to my Impl object and not my transaction interceptor. What am I doing wrong?