zoukankan      html  css  js  c++  java
  • Hibernate:数据库连接的配置

    SpringBoot连接mysql需要在application.properties添加一些微调信息,Spring自带连接池,如果用Spring自带的连接池:

    spring.datasource.url=jdbc:mysql://localhost:3306/jelly?useSSL=false&characterEncoding=utf8
    spring.datasource.username=tom
    spring
    .datasource.password=123456
    spring
    .datasource.driver-class-name=com.mysql.jdbc.Driver

     然后配置Hibernate

    # Specify the DBMS
    spring.jpa.database=MYSQL
    # Show or not log for each sql query
    spring.jpa.show-sql=true
    # Hibernate ddl auto (create, create-drop, update)
    spring.jpa.hibernate.ddl-auto=update
    # Naming strategy
    spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy
    # stripped before adding them to the entity manager)
    spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
  • 相关阅读:
    Logstash收集Tomcat日志
    Logstash收集日志
    ELK搭建&Logstash 日志收集
    ELK介绍
    中文分词器
    ES数据备份与恢复
    Python开发之路
    Linux阅读目录
    333
    22222222
  • 原文地址:https://www.cnblogs.com/colin220/p/9595524.html
Copyright © 2011-2022 走看看