added advanced Spring Retry example and removed Spring Retry xml config

This commit is contained in:
michaelisvy
2020-09-14 08:16:56 +08:00
parent ed7ce4ce34
commit 4e081b4fb6
6 changed files with 40 additions and 54 deletions
@@ -30,6 +30,16 @@ public class SpringRetryIntegrationTest {
myService.retryServiceWithRecovery(null);
}
@Test
public void givenRetryServiceWithCustomization_whenCallWithException_thenRetryRecover() throws SQLException {
myService.retryServiceWithCustomization(null);
}
@Test
public void givenRetryServiceWithExternalConfiguration_whenCallWithException_thenRetryRecover() throws SQLException {
myService.retryServiceWithExternalConfiguration(null);
}
@Test(expected = RuntimeException.class)
public void givenTemplateRetryService_whenCallWithException_thenRetry() {
retryTemplate.execute(arg0 -> {