【发布时间】:2019-10-15 17:24:21
【问题描述】:
当我使用 MySQL 和 hibernate 进行 Spring Boot 时,我在 .yml 文件中使用以下配置
spring:
datasource:
url: jdbc:mysql://localhost/userName?zeroDateTimeBehavior=convertToNull
username: userName
password: password
driverClassName: com.mysql.jdbc.Driver
jpa:
show-sql: false
hibernate:
dialect: org.hibernate.dialect.MySQLDialect
format_sql: false
ddl-auto: update
如果是mongoDB而不是mysql和hibernate怎么改?
【问题讨论】:
标签: java mysql mongodb hibernate spring-boot