spring boot中配置spring data jpa

2017-08-02  本文已影响0人  荀彧真人

application.properties

#DataSource Config  
spring.datasource.driver-class-name=com.mysql.jdbc.Driver  
spring.datasource.url=jdbc:mysql://localhost:6033/data_service?characterEncoding=utf8  
spring.datasource.username=root  
spring.datasource.password=root  
  
spring.jpa.show-sql= true  
spring.jpa.hibernate.ddl-auto=update  
spring.jpa.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect 

hibernate.hbm2ddl.auto节点的值有几个create、create-drop、update、validate、none

上一篇 下一篇

猜你喜欢

热点阅读