我试图用YML为jpa设置hibernate方言,
检查了许多主题,但没有设置:
spring:
datasource:
hikari:
allow-pool-suspension: true
connection-timeout: 1000
name: testDb
jpa:
database: h2
generate-ddl: false
database-platform: h2
package-to-scan: com.x.model
properties:
hibernate:
dialect: com.x.data.core.hibernate.dialect.ExtendedH2Dialect
h2:
console:
enabled: true
path: /h2怎么解决这个问题?
发布于 2018-09-28 01:52:38
com.x.data.core.hibernate.dialect.ExtendedH2Dialect是什么?你必须用方言作为org.hibernate.dialect.H2Dialect
下面是样品
server:
port: 8096
spring:
datasource:
driverClassName: org.h2.Driver
url: jdbc:h2:~/test
username: sa
password:
h2:
console:
enabled: true
jpa:
hibernate.ddl-auto: update
generate-ddl: false
show-sql: false
properties:
hibernate:
dialect: org.hibernate.dialect.H2Dialect注意:我使用的是spring-boot-starter-data-jpa 2.0.5
https://stackoverflow.com/questions/52546758
复制相似问题