coder

springboot Mybatis配置

2019-07-01  本文已影响0人  S拒绝拖延
# Server Port and Encoding
server:
  port: 8080
  servlet:
    context-path: /springMybatis #配置项目根目录

# Spring Datasource Settings
spring:
  datasource:
    name: druidDataSource
    type: com.alibaba.druid.pool.DruidDataSource
    druid:
      driver-class-name: com.mysql.cj.jdbc.Driver
      url: jdbc:mysql://localhost:3306/hearken5?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&useSSL=false
      username: root
      password: 12345678
      filters: stat
      max-active: 100
      initial-size: 1
      max-wait: 60000
      min-idle: 1
      time-between-eviction-runs-millis: 60000
      min-evictable-idle-time-millis: 300000
      validation-query: select 'x'
      test-while-idle: true
      test-on-borrow: false
      test-on-return: false
      pool-prepared-statements: true
      max-open-prepared-statements: 50
      max-pool-prepared-statement-per-connection-size: 20

# Mybatis config
mybatis:
  mapper-locations: classpath:mapping/*.xml
  type-aliases-package: com.sunsheen.spring_mybatis.business.model #实体所在的包
上一篇 下一篇

猜你喜欢

热点阅读