I want to a create a functional interface or default method where I pass in a jpa repository method such as findById
or findByNumber
and have it return a generic type; this way I annotate it with @Retryable
if the application fails to connect to db. Below are examples of methods I want passed through the functional interface:
Employee employee = repository.findById("2ed21");
Record record = repository.findbyNumber(311);