yml配置

作者: 劳资爱学习 | 来源:发表于2019-08-07 19:20 被阅读0次

service

server:
    tomcat:
        uri-encoding: UTF-8
        max-threads: 1000
        min-spare-threads: 30
    port: 8888
    connection-timeout: 5000
    context-path: /
spring:
    # 环境 dev|test|prod
    application:
        name: dsf-daily
    profiles:
        active: dev
    # jackson时间格式化
    jackson:
        time-zone: GMT+8
        date-format: yyyy-MM-dd HH:mm:ss
    http:
        multipart:
            max-file-size: 100MB
            max-request-size: 100MB
            enabled: true

    redis:
        open: true  # 是否开启redis缓存  true开启   false关闭
        database: 12
        host: 127.0.0.1
        port: 6379
        password:       # 密码(默认为空)
        timeout: 6000  # 连接超时时长(毫秒)
        pool:
            max-active: 1000  # 连接池最大连接数(使用负值表示没有限制)
            max-wait: -1      # 连接池最大阻塞等待时间(使用负值表示没有限制)
            max-idle: 10      # 连接池中的最大空闲连接
            min-idle: 5       # 连接池中的最小空闲连接

#mybatis
mybatis-plus:
  mapper-locations: classpath*:**/mapper/*/*Dao.xml
  #实体扫描,多个package用逗号或者分号分隔
  typeAliasesPackage: cn.com.do1.dsf.modules.*.entity
  global-config:
    #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
    id-type: 0
    #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
    field-strategy: 2
    #驼峰下划线转换
    db-column-underline: true
    #刷新mapper 调试神器
    refresh-mapper: true
    #数据库大写下划线转换
    #capital-mode: true
    #序列接口实现类配置
    #key-generator: com.baomidou.springboot.xxx
    #逻辑删除配置
    logic-delete-value: -1
    logic-not-delete-value: 0
    #自定义填充策略接口实现
    #meta-object-handler: com.baomidou.springboot.xxx
    #自定义SQL注入器
    sql-injector: com.baomidou.mybatisplus.mapper.LogicSqlInjector
  configuration:
    map-underscore-to-camel-case: true #将下划线映射到驼色大小写
    cache-enabled: false #已启用缓存
    call-setters-on-nulls: true #对空值调用setter

相关文章

网友评论

      本文标题:yml配置

      本文链接:https://www.haomeiwen.com/subject/xubadctx.html