授权获取优化,启动加载授权

yun-zuoyi
wei.peng 5 years ago
parent cd74a32e58
commit 1bd9fe9e06

@ -6,6 +6,7 @@ import cn.estsh.i3plus.core.api.iservice.busi.ISysUserInfoService;
import cn.estsh.i3plus.core.api.iservice.busi.ISystemResourceService;
import cn.estsh.i3plus.platform.common.util.CommonConstWords;
import cn.estsh.i3plus.platform.plugin.elasticsearch.ElasticSearchTool;
import cn.estsh.i3plus.platform.plugin.license.ImppLicenseTool;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.impp.framework.boot.configuration.SystemConfig;
import cn.estsh.impp.framework.boot.util.ImppRedis;
@ -37,7 +38,7 @@ public class AppStartSystemInit implements CommandLineRunner {
private ISystemInitService systemInitService;
@Autowired
private static Environment environment;
private Environment environment;
@Value("${spring.profiles.active}")
private String SPRING_PROFILES_ACTIVE;
@ -77,6 +78,10 @@ public class AppStartSystemInit implements CommandLineRunner {
LOGGER.info("【IMPP-Core 加载 ElasticSearch中 ...】");
initImppElasticSearch();
LOGGER.info("【IMPP-Core 加载 ElasticSearch完成】");
LOGGER.info("【IMPP-License 加载 License ...】");
ImppLicenseTool.getLicense();
LOGGER.info("【IMPP-License 加载 License完成】");
}
/**

@ -57,7 +57,10 @@ public class SysLogMongoService implements ISysLogService {
public SysLogTaskTimeRepository getSysLogTaskTimeRepository() {
if (logTaskTimeRDao == null && ImppSwitchUtil.isSwitchMongo()) {
logTaskTimeRDao = SpringContextsUtil.getBean(SysLogTaskTimeRepository.class);
try {
logTaskTimeRDao = SpringContextsUtil.getBean(SysLogTaskTimeRepository.class);
}catch (Exception e){
}
}
if (logTaskTimeRDao == null) {
@ -74,7 +77,10 @@ public class SysLogMongoService implements ISysLogService {
public SysLogSystemRepository getSysLogSystemRepository() {
if (logSystemRDao == null && ImppSwitchUtil.isSwitchMongo()) {
logSystemRDao = SpringContextsUtil.getBean(SysLogSystemRepository.class);
try {
logSystemRDao = SpringContextsUtil.getBean(SysLogSystemRepository.class);
}catch (Exception e){
}
}
if (logSystemRDao == null) {
@ -91,7 +97,10 @@ public class SysLogMongoService implements ISysLogService {
public SysLogOperateRepository getSysLogOperateRepository() {
if (logOperateRDao == null && ImppSwitchUtil.isSwitchMongo()) {
logOperateRDao = SpringContextsUtil.getBean(SysLogOperateRepository.class);
try {
logOperateRDao = SpringContextsUtil.getBean(SysLogOperateRepository.class);
}catch (Exception e){
}
}
if (logOperateRDao == null) {
@ -108,7 +117,10 @@ public class SysLogMongoService implements ISysLogService {
public SysLogExceptionRepository getSysLogExceptionRepository() {
if (logExceptionRDao == null && ImppSwitchUtil.isSwitchMongo()) {
logExceptionRDao = SpringContextsUtil.getBean(SysLogExceptionRepository.class);
try {
logExceptionRDao = SpringContextsUtil.getBean(SysLogExceptionRepository.class);
}catch (Exception e){
}
}
if (logExceptionRDao == null) {
@ -125,7 +137,10 @@ public class SysLogMongoService implements ISysLogService {
public MongoDbFactory getMongoDbFactory() {
if (mongoDbFactory == null && ImppSwitchUtil.isSwitchMongo()) {
mongoDbFactory = SpringContextsUtil.getBean(MongoDbFactory.class);
try {
mongoDbFactory = SpringContextsUtil.getBean(MongoDbFactory.class);
}catch (Exception e){
}
}
if (mongoDbFactory == null) {

Loading…
Cancel
Save