Commit ce7f76b3 zshaohui

双数据源修改

1 个父辈 5e351b95
......@@ -281,11 +281,10 @@ public abstract class AbstractBaseDao implements IBaseDao {
sequence.setSeq(new Long(1));
getMongoTemplate().insert(sequence);
}
}
try {
if (getBackUpMongoTemplate() != null) {
getBackUpMongoTemplate().insert(sequence);
getBackUpMongoTemplate().save(sequence);
}
} catch (Exception e) {
log.error("{}备份库操作失败:{}", "getNextId", e.getMessage());
......
......@@ -14,6 +14,16 @@ spring:
host: localhost # 主机地址
port: 27017 # 端口
database: smf # 数据库
maxConSize: 200
minConsize: 100
#备份数据库配置
backup-mongodb:
host: localhost
port: 27017
database: backup-smf
maxConSize: 100
minConsize: 50
#jwt
jwt:
......
......@@ -26,16 +26,6 @@ spring:
host: localhost # 主机地址
port: 27017 # 端口
database: smf # 数据库
maxConSize: 200
minConsize: 100
#备份数据库配置
#backup-mongodb:
#host: localhost
#port: 27017
#database: backup-smf
#maxConSize: 100
#minConsize: 50
messages:
encoding: utf-8
main:
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!