Home > front end >  Spring the boot on the query query timeout time how to deal with?
Spring the boot on the query query timeout time how to deal with?

Time:04-02

The following problems encountered in the developer:

Spring framework of the boot, the spring data jpa,

System contains two databases, primary database locally, database in other server,

Found this problem, now a good time to start the server, network environment and in a task query of database data, all of a sudden, the network is broken, this is the query a database query in the task card dead, no error does not return, even after the network recovery is still no way to continue, cause the whole task of web GG,

Have a great god know how to deal with?

CodePudding user response:

To add transaction @ Transactional query, set the timeout

CodePudding user response:

Set the timeout
  • Related