123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- # 内嵌服务器配置tomcat,jetty
- server:
- port: 8800
- # mysql
- spring:
- application:
- name: TOURIST
- datasource:
- type: com.alibaba.druid.pool.DruidDataSource
- url: jdbc:mysql://10.100.2.12:3306/tourist-dev?useUnicode=true&characterEncoding=utf8&useSSL=false
- username: root
- password: Wo4heike
- driver-class-name: com.mysql.jdbc.Driver
- # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
- filters: stat,wall,log4j
- # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
- connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
- # 合并多个DruidDataSource的监控数据
- useGlobalDataSourceStat: true
- # 连接池配置
- max-active: 200
- initial-size: 5
- max-wait: 60000
- min-idle: 1
- pool-prepared-statements: true
- max-open-prepared-statements: 20
- #在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位,一般比minEvictableIdleTimeMillis小
- time-between-eviction-runs-millis: 60000
- #连接池中连接,在时间段内一直空闲,被逐出连接池的时间(1000*60*60),以毫秒为单位
- min-evictable-idle-time-millis: 300000
- # 连接有效性检测
- test-while-idle: true
- test-on-borrow: false
- test-on-return: false
- validation-query: SELECT 1
- jpa:
- show-sql: true
- data:
- jpa:
- repositories:
- enabled: true
- redis:
- host: 10.100.2.12
- password: yinghuo
- port: 6379
- database: 0
- pool:
- min-idle: 5
- jackson:
- serialization: true
- time-zone: GMT+8
- date-format: java.text.SimpleDateFormat
- http:
- # 文件上传限制
- multipart:
- enabled: true
- max-file-size: 50mb
- max-request-size: 200mb
- thymeleaf:
- cache: false
- mode: LEGACYHTML5
- mybatis-plus:
- # 如果是放在src/main/java目录下 classpath:/com/yourpackage/*/mapper/*Mapper.xml
- # 如果是放在resource目录 classpath:/mapper/*Mapper.xml
- mapper-locations: classpath:/mapper/*Mapper.xml
- #实体扫描,多个package用逗号或者分号分隔
- typeAliasesPackage: com.yingying.tourist.domain
- 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
- #mp2.3+ 全局表前缀 mp_
- #table-prefix: t_
- #刷新mapper 调试神器
- #refresh-mapper: true
- #数据库大写下划线转换
- #capital-mode: true
- # Sequence序列接口实现类配置
- # key-generator: com.baomidou.mybatisplus.incrementer.OracleKeyGenerator
- #逻辑删除配置(下面3个配置)
- logic-delete-value: 1
- logic-not-delete-value: 0
- sql-injector: com.baomidou.mybatisplus.mapper.LogicSqlInjector
- #自定义填充策略接口实现
- #meta-object-handler: com.baomidou.springboot.MyMetaObjectHandler
- configuration:
- #配置返回数据库(column下划线命名&&返回java实体是驼峰命名),自动匹配无需as(没开启这个,SQL需要写as: select user_id as userId)
- map-underscore-to-camel-case: true
- cache-enabled: false
- #配置JdbcTypeForNull, oracle数据库必须配置
- jdbc-type-for-null: 'null'
- # log
- logging:
- config: classpath:logback.xml
- session:
- domain: wx.yingyinglicai.com
|