zoukankan      html  css  js  c++  java
  • application.properties文件配置

      在application.properties文件中配置mysql连接配置文件。

    spring.datasource.url = jdbc:mysql://localhost:3306/DatebaseName(自己数据库名)
    spring.datasource.username = root
    spring.datasource.password = 123
    spring.datasource.driverClassName = com.mysql.jdbc.Driver
    spring.datasource.max-active=20
    spring.datasource.max-idle=8
    spring.datasource.min-idle=8
    spring.datasource.initial-size=10

      在application.properties文件中配置JPA配置信息。

    # 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
    #[org.hibernate.cfg.ImprovedNamingStrategy #org.hibernate.cfg.DefaultNamingStrategy]
    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

       在application.properties文件中的服务器配置

    server.port=8080 #端口号设置
    server.servlet.context-path=/exam #访问路径设置

  • 相关阅读:
    robotframework----模板的使用
    RF执行顺序
    RobotFrameWork(四)变量运算与Evaluate
    RobotFrameWork(三)数据类型
    git 命令
    常用网站
    git 应用
    ie if判断
    移动端rem适配
    绘制三角形(sass)
  • 原文地址:https://www.cnblogs.com/yuanxls/p/11238391.html
Copyright © 2011-2022 走看看