4.2ORM集成的一般注意事项
4.2.1 资源和事务管理
4.2.2 异常事务
@Repository
public class ProductDaoImpl implements ProductDao {
// class body here...
}
~~
~~~xml
<beans>
<!-- Exception translation bean post processor -->
<bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor"/>
<bean id="myProductDao" class="product.ProductDaoImpl"/>
</beans>最后更新于
这有帮助吗?