Class superscript @Transactional achieve the above matters, and configure the appropriate transaction attribute (represented by the class with the global directly above, each method is the transaction attribute)
if the transaction attribute requirements for different words of a method, in which the method of the above write method @Transactional
First, modify the service implementation class
Second, modify the configuration bean.xml
This piece of code we do not need, and now give him deleted , because we have achieved through the comments, but at the same time we want to add annotations automatically scans the transaction xml configuration :
transaction-manager cited above is the definition we've transaction manager.
<tx:annotation-driven transaction-manager="transactionManager"></tx:annotation-driven>