SpringBoot配置数据库和mybatis

SpringBoot配置数据库和mybatis

server:
  port: 8080 # 端口号
spring:
  application:
    name: reggie-web-manage # 应用名称
  datasource: # 数据源配置
    druid:
      driver-class-name: com.mysql.jdbc.Driver
      url: jdbc:mysql://localhost:3306/reggie?useUnicode=true&characterEncoding=utf-8&useSSL=false
      username: root
      password: root
mybatis:
  configuration:
    map-underscore-to-camel-case: true # 驼峰命名法映射 address_book ---> AddressBook
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 日志输出
  mapper-locations: classpath:/mappers/**.xml # 指定xml位置

你可能感兴趣的:(Mybatis,mybatis,spring,boot,数据库)