@Retryable works only when exception is thrown.
private int count=1;
@Override
@Retryable
public int retry() throws Exception {
if (count <= 2) {
log.info("retry {} ", count++);
throw new MySessionExpiredException();
}
return count;
}