application.yml 1.38 KB
# Tomcat
server:
    tomcat:
        uri-encoding: UTF-8
        max-threads: 1000
        min-spare-threads: 30
    port: 8080
    #context-path: /renren-fastplus

# mysql
spring:
    # 环境 dev|test|pro
    profiles:
        active: dev
    datasource:
        type: com.alibaba.druid.pool.DruidDataSource
        driverClassName: com.mysql.jdbc.Driver
    # 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
    # 指定静态资源的路径
    resources:
        static-locations: classpath:/static/,classpath:/views/
    redis:
        open: false  # 是否开启redis缓存  true开启   false关闭
        database: 0
        host: redis-server
        port: 6379
        password:       # 密码(默认为空)
        timeout: 6000  # 连接超时时长(毫秒)
        pool:
            max-active: 1000  # 连接池最大连接数(使用负值表示没有限制)
            max-wait: -1      # 连接池最大阻塞等待时间(使用负值表示没有限制)
            max-idle: 10      # 连接池中的最大空闲连接
            min-idle: 5       # 连接池中的最小空闲连接

# Mybatis配置
mybatis:
    mapperLocations: classpath:mapper/**/*.xml
    configLocation: classpath:mybatis.xml