现在我使用spring boot,tomcat数据源,当我发表评论时,有时它会起作用,但有时它不起作用!我没有想法。请帮帮我!谢谢
这是我的java代码
spring:
application:
name: Club Application
datasource:
name: dev
url: jdbc:mysql://dev.mysql.apitops.com:4307/tops_club?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&failOverReadOnly=false
username: club_test
password: 7VBD2vqLnectdn9fvYKhpPGVL49wzJ
type: org.apache.tomcat.jdbc.pool.DataSource
driver-class-name: com.mysql.jdbc.Driver
tomcat:
init-s-q-l: SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci
max-active: 5
max-idle: 5
min-idle: 5
initial-size: 5
validation-query: 'select 1'
test-on-borrow: true
test-on-return: true
test-while-idle: true
max-wait: 15000