[英]Spring retry for DAO call with XML configuration
我有一個方法可以像這樣調用DAO調用
@Overide
public List methodGetList (Parameter) {
List myList = listDao.getList()
}
我想重試dao層是否拋出SQL異常。 在接口的方法上,在提供實現的類上,或在DAO中的getList()方法上,應在@Retryable注釋的何處使用。
我正在使用以下XML配置來啟用應用程序中的重試
<context:annotation-config />
<aop:aspectj-autoproxy />
<bean class="org.springframework.retry.annotation.RetryConfiguration" />
有什么幫助嗎?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.