zoukankan      html  css  js  c++  java
  • springboot-mybatis配置(xml)/springboot-jpa配置

    #springboot-mybatis配置(xml)
    spring.datasource.url=jdbc:mysql://localhost:3306/test
    spring.datasource.username=root
    spring.datasource.password=123456
    spring.datasource.driver-class-name=com.mysql.jdbc.Driver
    mybatis.mapper-locations=classpath*:mybatis/*Mapper.xml
    mybatis.type-aliases-package=com.forezp.entity

      通过配置mybatis.mapper-locations来指明mapper的xml文件存放位置,我是放在resources/mybatis文件下的。mybatis.type-aliases-package来指明和数据库映射的实体的所在包。

    springboot-jpa配置

    spring.datasource.url=jdbc:mysql://127.0.0.1/test?useUnicode=true&characterEncoding=utf-8&serverTimezone=UTC&useSSL=true
    spring.datasource.username=root
    spring.datasource.password=root
    spring.datasource.driver-class-name=com.mysql.jdbc.Driver
    
    spring.jpa.properties.hibernate.hbm2ddl.auto=update
    spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
    spring.jpa.show-sql= true
    

      

  • 相关阅读:
    密码加密
    注册视图
    session会话
    验证码功能
    使用Django表单替代html表单
    实现登陆视图功能
    设计登陆需求页面
    配置视图
    配置数据库
    npm 学习
  • 原文地址:https://www.cnblogs.com/Andrew520/p/9465295.html
Copyright © 2011-2022 走看看