application.yml

该配置文件展示了如何配置Spring Boot应用连接MySQL数据库,包括URL、用户名、密码和驱动类。此外,还提及了MyBatis的配置,如映射文件位置和驼峰命名转换。另外,日志级别被设置为DEBUG,用于调试。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

server:
  port: 8614
spring:
  datasource:
    # useUnicode=true&characterEncoding=utf8  存数据取数据 utf8 <--> GBK编码 互转
    # serverTimezone=GMT%2B8  GMT+8  %2B代表+
    # autoReconnect=true  断线是否重连
    # allowMultiQueries=true  是否运行批量操作
    # jdbc:mysql://localhost:3306/company?characterEncoding=utf8&useUnicode=true&serverTimezone=GMT%2B8&autoReconnect=true&allowMultiQueries=true
    url: jdbc:mysql://localhost:3306/company?characterEncoding=utf8&serverTimezone=GMT%2B8
    username: root
    # 密码使用0开头 要使用""包括  "01234"
    password: lvjing
    driver-class-name: com.mysql.cj.jdbc.Driver
mybatis:
  # 映射文件 sql文件
  mapper-locations: classpath:/mappers/*.xml
  # 驼峰映射
  configuration:
    map-underscore-to-camel-case: true
    # 设置别名包
  type-aliases-package: com.cy.pojo
server:
  port: 8614
spring:
  datasource:
    url: jdbc:mysql://localhost:3306/jt?characterEncoding=utf8&serverTimezone=GMT%2B8
    username: root
    password: lvjing
    driver-class-name: com.mysql.cj.jdbc.Driver

#mybatis:
#  mapper-locations: classpath:/mappers/*.xml
#  configuration:
#    map-underscore-to-camel-case: true
#  type-aliases-package: com.lvjing.sys.pojo

mybatis-plus:
  mapper-locations: classpath:/mappers/*.xml
  configuration:
    map-underscore-to-camel-case: true
  type-aliases-package: com.lvjing.sys.pojo

logging:
  level:
    com.lvjing: debug
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值