配置文件

mybatis.xml配置文件表头

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper>

</mapper>

JPA引擎问题

spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://localhost:3306/blogs?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
    username: root
    password: root

  jpa:
    #解决引擎不是InnoDB
    database-platform: org.hibernate.dialect.MySQL55Dialect
    hibernate:
      ddl-auto: create
    show-sql: true

MySql时区

jdbc:mysql://localhost:3306/xxxx?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai

本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!