Connection lost overnight (spring boot + mysql)

后端 未结 3 811
温柔的废话
温柔的废话 2020-12-19 01:47

My spring boot application always show me this whitelabel error in the morning: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.Persi

3条回答
  •  攒了一身酷
    2020-12-19 02:18

    You can also see this link It tells you to include the following lines in the application.properties file.

    spring.datasource.testWhileIdle = true
    spring.datasource.timeBetweenEvictionRunsMillis = 3600000
    spring.datasource.validationQuery = SELECT 1
    

提交回复
热议问题