application-dev.yml 3.0 KB
Newer Older
Z
zmingchun 已提交
1 2 3 4
# Server settings
server:
    tomcat:
        basedir: /var/tmp/website-blog-web
5 6 7
# SPRING PROFILES
spring:
    datasource:
8 9
        druid:
            connection-init-sqls: set names utf8mb4
D
doyutu 已提交
10
            driver-class-name: com.mysql.jdbc.Driver
11 12 13
        type: com.alibaba.druid.pool.DruidDataSource
        url: jdbc:mysql://localhost:3306/dblog?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&allowPublicKeyRetrieval=true
        username: root
Y
yadong.zhang 已提交
14
        password: root
15 16 17 18 19 20
    # 指定默认MimeMessage的编码,默认为: UTF-8
    mail:
        default-encoding: UTF-8
        # 指定SMTP server使用的协议,默认为: smtp
        protocol: smtp
        # 指定SMTP server host.
智布道's avatar
智布道 已提交
21
        host: xxx
22 23
        port: 465
        # 指定SMTP server的用户名.
智布道's avatar
智布道 已提交
24
        username: xxx
智布道's avatar
智布道 已提交
25
        # 指定SMTP server登录密码:
26 27 28 29 30 31 32 33 34 35 36 37 38 39
        password: xxx
        # 指定是否在启动时测试邮件服务器连接,默认为false
        test-connection: false
        properties:
            mail.smtp.auth: true
            # 腾讯企业邮箱 下两个配置必须!!!
            mail.smtp.ssl.enable: true
            mail.smtp.socketFactory.class: javax.net.ssl.SSLSocketFactory
            mail.smtp.socketFactory.port: 465
            mail.smtp.starttls.enable: true
            mail.smtp.starttls.required: true
            mail.smtp.connectiontimeout: 50000
            mail.smtp.timeout: 30000
            mail.smtp.writetimeout: 50000
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
    # redis缓存服务配置
    session:
        store-type: redis
    # Redis数据库索引(默认为0)
    redis:
        database: 5
        # Redis服务器地址
        host: 127.0.0.1
        # Redis服务器连接端口
        port: 6379
        # Redis服务器连接密码(默认为空)
        password: qwe!@#123
        jedis:
            pool:
                # 连接池最大连接数(使用负值表示没有限制)
                max-active: 8
                # 连接池最大阻塞等待时间(使用负值表示没有限制)
                max-wait: -1ms
                # 连接池中的最大空闲连接
                max-idle: 8
                # 连接池中的最小空闲连接
                min-idle: 0
        # 连接超时时间(毫秒)
        timeout: 5000ms
        # 默认的数据过期时间,主要用于shiro权限管理
        expire: 2592000
Z
zmingchun 已提交
66 67 68 69

# logging settings
logging:
  path: /var/tmp/website-blog-web
70

71 72 73 74
####################################自定义配置##########################################
app:
    # 是否启用kaptcha验证码
    enableKaptcha: false
智布道's avatar
智布道 已提交
75 76
    # 创建网站的时间,用于计算已建站的天数,默认为2018-01-01
    buildWebsiteDate: 2018-01-01 00:00:00
77 78 79 80 81 82 83 84

# braum过滤器,用于过滤恶意请求
braum:
    limit:
        access:
            type: redis
            threshold: 15
            interval: 5000
D
doyutu 已提交
85
####################################自定义配置##########################################