1
0
mirror of https://github.com/chatopera/cosin.git synced 2025-08-01 16:38:02 +08:00

Separate application.properties

This commit is contained in:
dengchao@xgtl 2020-04-17 15:52:07 +08:00
parent 4f8e19ba2f
commit 5b7b4bf833
3 changed files with 124 additions and 130 deletions

View File

@ -0,0 +1,46 @@
# suppress inspection "SpringBootApplicationProperties" for whole file
# \u5728\u96C6\u7FA4\u72B6\u6001\u4E0B\uFF0C\u6BCF\u4E2ANode\u90FD\u6709\u81EA\u5DF1\u552F\u4E00\u7684ID
application.node.id=localhost
application.build.datestr=PLACEHOLDER
application.customer.entity=Trial
##############################################
# \u5B89\u5168\u8BBE\u7F6E
##############################################
# cookie\u52A0\u5BC6
application.security.password=cskefu
server.session-timeout=86400
server.threads.max=2000
server.connection.max=2000
# IM Server
uk.im.server.port=8036
uk.im.server.host=localhost
uk.im.server.threads=1000
cs.im.server.ssl.port=
##############################################
# \u4E34\u65F6\u6587\u4EF6\u5B58\u50A8
##############################################
web.upload-path=../data
##############################################
# Cache
##############################################
## Available create_by_force, skip
cache.setup.strategy=create_by_force
##############################################
# Callout Settings
##############################################
# Loop Interval
cskefu.callout.watch.interval=60000
##############################################
# \u4F01\u4E1A\u804A\u5929\u673A\u5668\u4EBA
##############################################
bot.baseurl=https://bot.chatopera.com
##############################################
# \u4E1A\u52A1\u529F\u80FD\u76F8\u5173\u8BBE\u7F6E
##############################################
# \u662F\u5426\u5F00\u542F\u6E20\u9053\u8BBF\u5BA2\u72EC\u7ACB https://gitlab.chatopera.com/chatopera/cosinee/issues/838
cskefu.settings.webim.visitor-separate=false
##############################################
# Skype\u6E20\u9053\u96C6\u6210\u914D\u7F6E
##############################################
# \u4ECE\u5916\u90E8\u7CFB\u7EDF\u83B7\u5F97 SkypeID\u5BF9\u5E94\u7684\u8054\u7CFB\u4EBA\u4FE1\u606F
channel.skype.crm=

View File

@ -0,0 +1,27 @@
# suppress inspection "SpringBootApplicationProperties" for whole file
##Druid
# \u521D\u59CB\u5316\u5927\u5C0F\uFF0C\u6700\u5C0F\uFF0C\u6700\u5927
spring.datasource.druid.initial-size=5
spring.datasource.druid.max-active=100
spring.datasource.druid.min-idle=5
# \u914D\u7F6E\u83B7\u53D6\u8FDE\u63A5\u7B49\u5F85\u8D85\u65F6\u7684\u65F6\u95F4
spring.datasource.druid.max-wait=60000
# \u6253\u5F00PSCache\uFF0C\u5E76\u4E14\u6307\u5B9A\u6BCF\u4E2A\u8FDE\u63A5\u4E0APSCache\u7684\u5927\u5C0F
spring.datasource.druid.pool-prepared-statements=true
spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20
#spring.datasource.druid.max-open-prepared-statements= #\u548C\u4E0A\u9762\u7684\u7B49\u4EF7
spring.datasource.druid.validation-query=SELECT 1 FROM DUAL
spring.datasource.druid.validation-query-timeout=60000
spring.datasource.druid.test-on-borrow=false
spring.datasource.druid.test-on-return=false
spring.datasource.druid.test-while-idle=true
# \u914D\u7F6E\u95F4\u9694\u591A\u4E45\u624D\u8FDB\u884C\u4E00\u6B21\u68C0\u6D4B\uFF0C\u68C0\u6D4B\u9700\u8981\u5173\u95ED\u7684\u7A7A\u95F2\u8FDE\u63A5\uFF0C\u5355\u4F4D\u662F\u6BEB\u79D2
spring.datasource.druid.time-between-eviction-runs-millis=60000
# \u914D\u7F6E\u4E00\u4E2A\u8FDE\u63A5\u5728\u6C60\u4E2D\u6700\u5C0F\u751F\u5B58\u7684\u65F6\u95F4\uFF0C\u5355\u4F4D\u662F\u6BEB\u79D2
spring.datasource.druid.min-evictable-idle-time-millis=100000
# \u914D\u7F6E\u4E00\u4E2A\u8FDE\u63A5\u5728\u6C60\u4E2D\u6700\u5927\u751F\u5B58\u7684\u65F6\u95F4\uFF0C\u5355\u4F4D\u662F\u6BEB\u79D2
#spring.datasource.druid.max-evictable-idle-time-millis=
spring.datasource.druid.filters=stat,wall,log4j
# WebStatFilter\u914D\u7F6E\uFF0C\u8BF4\u660E\u8BF7\u53C2\u8003Druid Wiki\uFF0C\u914D\u7F6E_\u914D\u7F6EWebStatFilter
spring.datasource.druid.web-stat-filter.enabled=true
spring.datasource.druid.web-stat-filter.url-pattern=/*

View File

@ -1,5 +1,5 @@
#
# Copyright (C) 2017 优客服-多渠道客服系统
# Copyright (C) 2017 \u4F18\u5BA2\u670D-\u591A\u6E20\u9053\u5BA2\u670D\u7CFB\u7EDF
# Modifications copyright (C) 2018-2019 Chatopera Inc, <https://www.chatopera.com>
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -11,43 +11,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# 如何加载配置文件
# \u5982\u4F55\u52A0\u8F7D\u914D\u7F6E\u6587\u4EF6
# https://docs.spring.io/spring-boot/docs/1.5.6.RELEASE/reference/htmlsingle/
# https://stackoverflow.com/questions/35531661/using-env-variable-in-spring-boots-application-properties
# 在集群状态下每个Node都有自己唯一的ID
application.node.id=localhost
application.build.datestr=PLACEHOLDER
application.customer.entity=Trial
spring.profiles.active=coisn,druid
##############################################
# 安全设置
##############################################
# cookie加密
application.security.password=cskefu
# security
management.security.enabled=false
server.session-timeout=86400
server.threads.max=2000
server.connection.max=2000
##############################################
# 服务端口
# \u670D\u52A1\u7AEF\u53E3
##############################################
# server
server.port=8035
server.context-path=/
server.servlet.context-path=/
# IM Server
uk.im.server.port=8036
uk.im.server.host=localhost
uk.im.server.threads=1000
cs.im.server.ssl.port=
# 文件上传限制
# \u6587\u4EF6\u4E0A\u4F20\u9650\u5236
spring.servlet.multipart.enabled=true
spring.servlet.multipart.max-file-size=15MB
spring.servlet.multipart.max-request-size=15MB
@ -55,18 +32,15 @@ spring.servlet.multipart.max-request-size=15MB
server.tomcat.remote-ip-header=x-forwarded-for
server.tomcat.protocol-header=x-forwarded-proto
# Setting max size of post requests to 100MB
server.tomcat.max-http-post-size=1000000000
server.tomcat.max-http-form-post-size=1000000000
server.tomcat.max-swallow-size=1000000000
# The maximum number of request processing threads to be created by this Connector
server.tomcat.max-threads=400
##############################################
# 日志及临时文件存储
# \u65E5\u5FD7\u53CA\u4E34\u65F6\u6587\u4EF6\u5B58\u50A8
##############################################
server.log.path=../logs
server.log.level=INFO
web.upload-path=../data
logging.file.path=../logs
logging.level.root=info
##############################################
# FREEMARKER (FreeMarkerAutoConfiguration)
##############################################
@ -89,22 +63,24 @@ spring.freemarker.settings.default_encoding=UTF-8
spring.freemarker.settings.url_escaping_charset=UTF-8
spring.freemarker.settings.classic_compatible=true
spring.freemarker.settings.number_format=0.###
spring.freemarker.order=1
#spring.freemarker.order=1
##############################################
# Spring Data
##############################################
spring.data.jpa.repositories.enabled=true
spring.data.redis.repositories.enabled=false
# Elasticsearch
# suppress inspection "SpringBootApplicationProperties"
spring.data.elasticsearch.properties.path.data=../data
# suppress inspection "SpringBootApplicationProperties"
spring.data.elasticsearch.cluster-name=elasticsearch
# suppress inspection "SpringBootApplicationProperties"
spring.data.elasticsearch.cluster-nodes=127.0.0.1:9300
# suppress inspection "SpringBootApplicationProperties"
spring.data.elasticsearch.local=false
spring.data.elasticsearch.repositories.enabled=true
# suppress inspection "SpringBootApplicationProperties"
spring.data.elasticsearch.properties.index.max_result_window=100000
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
@ -117,115 +93,60 @@ spring.datasource.password=123456
spring.jpa.properties.hibernate.current_session_context_class=org.springframework.orm.hibernate5.SpringSessionContext
spring.jpa.show-sql=false
##Druid
# \u521D\u59CB\u5316\u5927\u5C0F\uFF0C\u6700\u5C0F\uFF0C\u6700\u5927
spring.datasource.druid.initial-size=5
spring.datasource.druid.max-active=100
spring.datasource.druid.min-idle=5
# \u914D\u7F6E\u83B7\u53D6\u8FDE\u63A5\u7B49\u5F85\u8D85\u65F6\u7684\u65F6\u95F4
spring.datasource.druid.max-wait=60000
# \u6253\u5F00PSCache\uFF0C\u5E76\u4E14\u6307\u5B9A\u6BCF\u4E2A\u8FDE\u63A5\u4E0APSCache\u7684\u5927\u5C0F
spring.datasource.druid.pool-prepared-statements=true
spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20
#spring.datasource.druid.max-open-prepared-statements= #\u548C\u4E0A\u9762\u7684\u7B49\u4EF7
spring.datasource.druid.validation-query=SELECT 1 FROM DUAL
spring.datasource.druid.validation-query-timeout=60000
spring.datasource.druid.test-on-borrow=false
spring.datasource.druid.test-on-return=false
spring.datasource.druid.test-while-idle=true
# \u914D\u7F6E\u95F4\u9694\u591A\u4E45\u624D\u8FDB\u884C\u4E00\u6B21\u68C0\u6D4B\uFF0C\u68C0\u6D4B\u9700\u8981\u5173\u95ED\u7684\u7A7A\u95F2\u8FDE\u63A5\uFF0C\u5355\u4F4D\u662F\u6BEB\u79D2
spring.datasource.druid.time-between-eviction-runs-millis=60000
# \u914D\u7F6E\u4E00\u4E2A\u8FDE\u63A5\u5728\u6C60\u4E2D\u6700\u5C0F\u751F\u5B58\u7684\u65F6\u95F4\uFF0C\u5355\u4F4D\u662F\u6BEB\u79D2
spring.datasource.druid.min-evictable-idle-time-millis=100000
# \u914D\u7F6E\u4E00\u4E2A\u8FDE\u63A5\u5728\u6C60\u4E2D\u6700\u5927\u751F\u5B58\u7684\u65F6\u95F4\uFF0C\u5355\u4F4D\u662F\u6BEB\u79D2
#spring.datasource.druid.max-evictable-idle-time-millis=
spring.datasource.druid.filters=stat,wall,log4j
# WebStatFilter\u914D\u7F6E\uFF0C\u8BF4\u660E\u8BF7\u53C2\u8003Druid Wiki\uFF0C\u914D\u7F6E_\u914D\u7F6EWebStatFilter
spring.datasource.druid.web-stat-filter.enabled=true
spring.datasource.druid.web-stat-filter.url-pattern=/*
##############################################
# Cache
##############################################
## Available create_by_force, skip
cache.setup.strategy=create_by_force
##############################################
# Redis Connection
##############################################
# Redis数据库索引默认为0
# Redis\u6570\u636E\u5E93\u7D22\u5F15\uFF08\u9ED8\u8BA4\u4E3A0\uFF09
spring.redis.database=2
# suppress inspection "SpringBootApplicationProperties"
spring.redis.session.db=1
# suppress inspection "SpringBootApplicationProperties"
spring.redis.token.db=3
# Redis服务器地址
# Redis\u670D\u52A1\u5668\u5730\u5740
spring.redis.host=localhost
# Redis服务器连接端口
# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u7AEF\u53E3
spring.redis.port=6379
# Redis服务器连接密码(默认为空)
# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u5BC6\u7801\uFF08\u9ED8\u8BA4\u4E3A\u7A7A\uFF09
spring.redis.password=
# 连接池最大连接数(使用负值表示没有限制)
spring.redis.pool.max-active=-1
# 连接池最大阻塞等待时间(使用负值表示没有限制)
spring.redis.pool.max-wait=-1
# 连接池中的最大空闲连接
spring.redis.pool.max-idle=20
# 连接池中的最小空闲连接
spring.redis.pool.min-idle=10
# 连接超时时间(毫秒),因为春松客服启动时
# 占用比较大的时间此处timeout值必须设置为0才能正常启动
# \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
spring.redis.lettuce.pool.max-active=-1
# \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09
spring.redis.lettuce.pool.max-wait=-1
# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5927\u7A7A\u95F2\u8FDE\u63A5
spring.redis.lettuce.pool.max-idle=20
# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5C0F\u7A7A\u95F2\u8FDE\u63A5
spring.redis.lettuce.pool.min-idle=10
# \u8FDE\u63A5\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09\uFF0C\u56E0\u4E3A\u6625\u677E\u5BA2\u670D\u542F\u52A8\u65F6
# \u5360\u7528\u6BD4\u8F83\u5927\u7684\u65F6\u95F4\uFF0C\u6B64\u5904timeout\u503C\u5FC5\u987B\u8BBE\u7F6E\u4E3A0\u624D\u80FD\u6B63\u5E38\u542F\u52A8
spring.redis.timeout=0
##############################################
# Callout Settings
##############################################
# Loop Interval
cskefu.callout.watch.interval=60000
##############################################
# 企业聊天机器人
##############################################
bot.baseurl=https://bot.chatopera.com
##############################################
# 业务功能相关设置
##############################################
# 是否开启渠道访客独立 https://gitlab.chatopera.com/chatopera/cosinee/issues/838
cskefu.settings.webim.visitor-separate=false
##############################################
# Skype渠道集成配置
##############################################
# 从外部系统获得 SkypeID对应的联系人信息
channel.skype.crm=
##############################################
# ActiveMQ消息服务
# ActiveMQ\u6D88\u606F\u670D\u52A1
##############################################
spring.activemq.broker-url=tcp://localhost:61616
spring.activemq.user=admin
spring.activemq.password=admin
spring.activemq.pool.enabled=true
spring.activemq.pool.max-connections=50
##############################################
# Actuator 监控数据采集
# Actuator \u76D1\u63A7\u6570\u636E\u91C7\u96C6
# https://docs.spring.io/spring-boot/docs/1.5.9.RELEASE/reference/html/production-ready-endpoints.html
##############################################
management.context-path=/actuator
endpoints.sensitive=true
endpoints.hypermedia.enabled=true
management.server.servlet.context-path=/actuator
#endpoints.sensitive=true
endpoints.prometheus.enabled=true
endpoints.metrics.enabled=true
endpoints.health.enabled=true
endpoints.info.enabled=true
endpoints.actuator.enabled=true
endpoints.beans.enabled=false
endpoints.auditevents.enabled=false
endpoints.autoconfig.enabled=false
endpoints.env.enabled=false
endpoints.loggers.enabled=false
endpoints.configprops.enabled=false
endpoints.mappings.enabled=false
endpoints.shutdown.enabled=false
endpoints.trace.enabled=false
management.endpoint.metrics.enabled=true
management.endpoint.health.enabled=true
management.endpoint.info.enabled=true
#endpoints.actuator.enabled=true # no longer exists
management.endpoint.beans.enabled=false
management.endpoint.auditevents.enabled=false
management.endpoint.conditions.enabled=false
management.endpoint.env.enabled=false
management.endpoint.loggers.enabled=false
management.endpoint.configprops.enabled=false
management.endpoint.mappings.enabled=false
management.endpoint.shutdown.enabled=false
management.endpoint.httptrace.enabled=false