| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; |
| | | |
| | | import java.util.concurrent.ExecutionException; |
| | | import java.util.concurrent.TimeoutException; |
| | | |
| | | |
| | | /** |
| | |
| | | @SneakyThrows |
| | | @Override |
| | | public void onPartialResponse(String token) { |
| | | System.out.println(token); |
| | | //System.out.println(token); |
| | | emitter.send(token); |
| | | } |
| | | |
| | | @SneakyThrows |
| | | @Override |
| | | public void onError(Throwable error) { |
| | | System.out.println(error.getMessage()); |
| | | // System.out.println(error.getMessage()); |
| | | emitter.send(error.getMessage()); |
| | | } |
| | | |