springboot 连接数据库报错 Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnviron
程序员文章站
2022-04-12 21:27:29
...
是因为配置问题,出现这个错误出现
spring:
profiles:
active: dev
application:
name: qua
datasource:
driver-class-name: com.mysql.jdbc.Driver
type: com.zaxxer.hikari.HikariDataSource
url: jdbc:mysql://192.168.1.100:3306/qua?characterEncoding=UTF-8&useSSL=true
username: root
password: root
jpa:
hibernate:
ddl-auto: update
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
show-sql: true
hikari:
minimum-idle: 10
maximum-pool-size: 30
connection-test-query: SELECT 1 FROM DUAL
connection-timeout: 30000
idleTimeout: 600000
maxLifetime: 1800000
上一篇: C/C++混合编程代码实例