首页 > 技术文章 > springboot(配置)版本(0.0.1)

taking-notes 2022-04-11 14:47 原文

spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://localhost:3306/hotevent?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8
    username: root
    password: lcq123
  #关闭模板引擎缓存
  thymeleaf:
    cache: false
    #编码格式
    encoding: UTF-8
    #模板类型(默认是html)
    mode: HTML

#mybatis
mybatis-plus:
  #实体类别名
  type-aliases-package: com.example.hotevent.pojo
  configuration:
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
    #是否开启驼峰命名自动映射,即从经典数据库列名 A_COLUMN 映射到经典 Java 属性名 aColumn。
    map-underscore-to-camel-case: false
    #<!--自动映射-->
    auto-mapping-behavior: full
  mapper-locations: classpath*:/mapper/*.xml

推荐阅读