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
Check this answer: Spring Boot JPA - configuring auto reconnect
In short, you'll need:
spring.datasource.testOnBorrow=true spring.datasource.validationQuery=SELECT 1