Trupti shinde
Trupti shinde

Reputation: 11

can we implement Resilience4j @Retry on JPA repository methods like findAll, findbyId etc?

@Repository interface Test extends JpaRepository<EntityName,String> {

@Retry(name="database") Optional findById(Id id);

}

can we implement @Retry on JpaRepository methods ?

if some issue occur with findById() method it will retry 2 times and circuit breaker will execute.

Upvotes: 1

Views: 325

Answers (0)

Related Questions