update backend config
This commit is contained in:
parent
b6fddfd74f
commit
9f80f4b1a0
|
@ -12,7 +12,6 @@ import top.hcode.hoj.pojo.entity.judge.RemoteJudgeAccount;
|
|||
import top.hcode.hoj.pojo.vo.ConfigVo;
|
||||
import top.hcode.hoj.service.common.impl.ConfigServiceImpl;
|
||||
import top.hcode.hoj.service.judge.impl.RemoteJudgeAccountServiceImpl;
|
||||
import top.hcode.hoj.utils.RedisUtils;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
@ -35,9 +34,6 @@ public class StartupRunner implements CommandLineRunner {
|
|||
@Autowired
|
||||
private RemoteJudgeAccountServiceImpl remoteJudgeAccountService;
|
||||
|
||||
@Autowired
|
||||
private RedisUtils redisUtils;
|
||||
|
||||
@Value("${OPEN_REMOTE_JUDGE:true}")
|
||||
private String openRemoteJudge;
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
spring:
|
||||
profiles: dev
|
||||
# 配置文件上传限制
|
||||
servlet:
|
||||
multipart:
|
||||
|
@ -47,23 +46,12 @@ spring:
|
|||
thymeleaf:
|
||||
encoding: UTF-8
|
||||
|
||||
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath*:top/hcode/hoj/dao/xml/**Mapper.xml
|
||||
type-aliases-package: top.hcode.hoj.pojo.entity
|
||||
|
||||
shiro-redis:
|
||||
enabled: true
|
||||
redis-manager:
|
||||
host: 127.0.0.1:6379
|
||||
password: 123456
|
||||
|
||||
ribbon:
|
||||
# 指的是建立连接所用的时间,适用于网络状况正常的情况下,俩端连接所用的时间 单位是秒
|
||||
ReadTimeout: 10000
|
||||
# 指的是建立连接后从服务器读取到可用资源的时间
|
||||
ConnectTimeout: 30000
|
||||
|
||||
logging:
|
||||
level:
|
||||
com:
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
spring:
|
||||
profiles: prod
|
||||
# 配置文件上传限制
|
||||
servlet:
|
||||
multipart:
|
||||
|
@ -47,28 +46,12 @@ spring:
|
|||
thymeleaf:
|
||||
encoding: UTF-8
|
||||
|
||||
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath*:top/hcode/hoj/dao/xml/**Mapper.xml
|
||||
type-aliases-package: top.hcode.hoj.pojo.entity
|
||||
configuration:
|
||||
cache-enabled: false
|
||||
# 关闭打印 mybatis-plus 的 LOGO
|
||||
global-config:
|
||||
banner: false
|
||||
|
||||
shiro-redis:
|
||||
enabled: true
|
||||
redis-manager:
|
||||
host: ${hoj.redis.host:${REDIS_HOST:172.20.0.2}}:${hoj.redis.port:${REDIS_PORT:6379}}
|
||||
password: ${hoj.redis.password:${REDIS_PASSWORD:hoj123456}}
|
||||
|
||||
ribbon:
|
||||
# 指的是建立连接所用的时间,适用于网络状况正常的情况下,俩端连接所用的时间 单位是秒
|
||||
ReadTimeout: 10000
|
||||
# 指的是建立连接后从服务器读取到可用资源的时间
|
||||
ConnectTimeout: 30000
|
||||
|
||||
logging:
|
||||
level:
|
||||
com:
|
||||
|
|
|
@ -1,91 +1,16 @@
|
|||
spring:
|
||||
profiles:
|
||||
active: prod
|
||||
---
|
||||
# 消费者将要去访问的微服务名称(注册成功进入nacos的微服务提供者)
|
||||
service-url:
|
||||
hoj-judge-server: http://hoj-judgeserver # 服务访问base_url
|
||||
name: hoj-judgeserver # 服务名
|
||||
|
||||
spring:
|
||||
profiles: prod
|
||||
# 配置文件上传限制
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 256MB
|
||||
max-request-size: 256MB
|
||||
|
||||
redis:
|
||||
host: ${hoj.redis.host:${REDIS_HOST:172.20.0.2}}
|
||||
port: ${hoj.redis.port:${REDIS_PORT:6379}}
|
||||
timeout: 60000
|
||||
jedis:
|
||||
pool:
|
||||
min-idle: 10 #连接池中的最小空闲连接
|
||||
max-idle: 50 #连接池中的最大空闲连接
|
||||
max-active: 200 #连接池最大连接数(使用负值表示没有限制)
|
||||
max-wait: -1 #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
password: ${hoj.redis.password:${REDIS_PASSWORD:hoj123456}}
|
||||
datasource:
|
||||
username: ${hoj.db.username:${MYSQL_USERNAME:root}}
|
||||
password: ${hoj.db.password:${MYSQL_ROOT_PASSWORD:hoj123456}}
|
||||
url: jdbc:mysql://${hoj.db.host:${MYSQL_HOST:172.20.0.3}}:${hoj.db.port:${MYSQL_PORT:3306}}/${hoj.db.name:${MYSQL_DATABASE_NAME:hoj}}?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
initial-size: 10 # 初始化时建立物理连接的个数。初始化发生在显示调用init方法,或者第一次getConnection时
|
||||
min-idle: 20 # 最小连接池数量
|
||||
maxActive: 200 # 最大连接池数量
|
||||
maxWait: 60000 # 获取连接时最大等待时间,单位毫秒。配置了maxWait之后,缺省启用公平锁,并发效率会有所下降,如果需要可以通过配置
|
||||
timeBetweenEvictionRunsMillis: 60000 # 关闭空闲连接的检测时间间隔.Destroy线程会检测连接的间隔时间,如果连接空闲时间大于等于minEvictableIdleTimeMillis则关闭物理连接。
|
||||
minEvictableIdleTimeMillis: 300000 # 连接的最小生存时间.连接保持空闲而不被驱逐的最小时间
|
||||
validationQuery: SELECT 1 FROM DUAL # 验证数据库服务可用性的sql.用来检测连接是否有效的sql 因数据库方言而差, 例如 oracle 应该写成 SELECT 1 FROM DUAL
|
||||
testWhileIdle: true # 申请连接时检测空闲时间,根据空闲时间再检测连接是否有效.建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRun
|
||||
testOnBorrow: false # 申请连接时直接检测连接是否有效.申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
|
||||
testOnReturn: false # 归还连接时检测连接是否有效.归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
|
||||
poolPreparedStatements: true # 开启PSCache
|
||||
maxPoolPreparedStatementPerConnectionSize: 20 #设置PSCache值
|
||||
connectionErrorRetryAttempts: 3 # 连接出错后再尝试连接三次
|
||||
breakAfterAcquireFailure: true # 数据库服务宕机自动重连机制
|
||||
timeBetweenConnectErrorMillis: 300000 # 连接出错后重试时间间隔
|
||||
asyncInit: true # 异步初始化策略
|
||||
remove-abandoned: true # 是否自动回收超时连接
|
||||
remove-abandoned-timeout: 1800 # 超时时间(以秒数为单位)
|
||||
transaction-query-timeout: 6000 # 事务超时时间
|
||||
filters: stat,wall,log4j #数据库日志
|
||||
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500
|
||||
|
||||
|
||||
|
||||
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath*:top/hcode/hoj/dao/xml/**Mapper.xml
|
||||
type-aliases-package: top.hcode.hoj.pojo.entity
|
||||
configuration:
|
||||
cache-enabled: false
|
||||
# 关闭打印 mybatis-plus 的 LOGO
|
||||
# 关闭打印 mybatis-plus 的 LOGO
|
||||
global-config:
|
||||
banner: false
|
||||
shiro-redis:
|
||||
enabled: true
|
||||
redis-manager:
|
||||
host: ${hoj.redis.host:${REDIS_HOST:172.20.0.2}}:${hoj.redis.port:${REDIS_PORT:6379}}
|
||||
password: ${hoj.redis.password:${REDIS_PASSWORD:hoj123456}}
|
||||
|
||||
ribbon:
|
||||
# 指的是建立连接所用的时间,适用于网络状况正常的情况下,俩端连接所用的时间 单位是秒
|
||||
ReadTimeout: 10000
|
||||
# 指的是建立连接后从服务器读取到可用资源的时间
|
||||
ConnectTimeout: 30000
|
||||
|
||||
logging:
|
||||
level:
|
||||
com:
|
||||
alibaba:
|
||||
nacos:
|
||||
client:
|
||||
naming: error
|
||||
gargoylesoftware: off
|
||||
root: error
|
||||
config: classpath:logback-spring.xml
|
||||
file:
|
||||
path: /hoj/log/backend
|
||||
# 消费者将要去访问的微服务名称(注册成功进入nacos的微服务提供者)
|
||||
service-url:
|
||||
name: hoj-judgeserver # 服务名
|
|
@ -33,8 +33,3 @@ spring:
|
|||
# ${spring.cloud.nacos.config.prefix}-${spring.profile.active}.${spring.cloud.naces.config.file-extension}
|
||||
# hoj-prod.yml
|
||||
|
||||
# 消费者将要去访问的微服务名称(注册成功进入nacos的微服务提供者)
|
||||
service-url:
|
||||
hoj-judge-server: http://hoj-judgeserver # 服务访问base_url
|
||||
name: hoj-judgeserver # 服务名
|
||||
|
||||
|
|
Loading…
Reference in New Issue