Timeout configuration for a single call in Spring Boot

Asked

Viewed 57 times

1

It is possible to set timeout for a single specific Controller class in Spring Boot, how can I do this? Because using the property spring.session.timeout it arrow the timeout for the application as a whole and this is not the goal. I’m using Spring Boot 2. To be clear, I need something equivalent to the @Accesstimeout annotation from EJB, only facing the Spring.

1 answer

0

You can use the following annotation:

@Transactional(timeout = 200)

It can be either in the Controller as a whole or in a specific endpoint.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.