application.yml

117 阅读1分钟
# 修改端口
server:
  port: 3000
# 配置Druid数据源
spring:
  datasource:
    druid:
      driver-class-name: com.mysql.cj.jdbc.Driver
      url: jdbc:mysql://localhost:3306/springboot
      username: root
      password:
# 设置Mp相关的配置(如果数据库中名和封装类名不一致)
mybatis-plus:
  #(如果数据库中名和封装类名不一致)
  global-config:
    db-config:
      # 前缀
      table-prefix:
      # 使用数据库的id自增
      id-type: auto
  # 开启Mp运行日志,好处:不用使用打印语句
  configuration:
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl