springboot中的常用配置信息

server:
  port: 8989
  servlet:
    context-path: /

spring:
   datasource:
      driver-class-name: com.mysql.cj.jdbc.Driver
      url: jdbc:mysql://127.0.0.1:3306/jxc_manage?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
      username: root
      password: root
      hikari:
        # 连接池名
        pool-name: DateHikariCP
        # 最小空闲连接数
        minimum-idle: 5
        # 空闲连接存活最大时间,默认600000(10分钟)
        idle-timeout: 180000
        # 最大连接数,默认10
        maximum-pool-size: 10
        # 从连接池返回的连接的自动提交
        auto-commit: true
        # 连接最大存活时间,0表示永久存活,默认1800000(30分钟)
        max-lifetime: 1800000
        # 连接超时时间,默认30000(30秒)
        connection-timeout: 30000
        # 测试连接是否可用的查询语句
        connection-test-query: SELECT 1
   ## freemarker
   freemarker:
     suffix: .ftl
     content-type: text/html
     charset: UTF-8
     template-loader-path: classpath:/views/
     request-context-attribute: ctx
     settings:
        number_format: 0.##

# Mybatis-plus配置
mybatis-plus:
  #配置Mapper映射文件
  mapper-locations: classpath*:/mapper/*Mapper.xml
  # 配置MyBatis数据返回类型别名(默认别名是类名)
  type-aliases-package: com.lzj.admin.pojo
  configuration:
    # 自动驼峰命名
    map-underscore-to-camel-case: true



## SQL 打印(方法接口所在的包,不是Mapper.xml所在的包)
logging:
  level:
    com.lzj.admin.mapper: debug




 ## 控制台日志输出格式
  pattern:
    console: '%d{2100-01-01 13:14:00.666} [%thread] %-5level %logger{50} - %msg%n'

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值