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

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.core.api.iservice.busi.ISystemResourceService;
import cn.estsh.i3plus.platform.common.util.CommonConstWords; import cn.estsh.i3plus.platform.common.util.CommonConstWords;
import cn.estsh.i3plus.platform.plugin.elasticsearch.ElasticSearchTool; 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.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.impp.framework.boot.configuration.SystemConfig; import cn.estsh.impp.framework.boot.configuration.SystemConfig;
import cn.estsh.impp.framework.boot.util.ImppRedis; import cn.estsh.impp.framework.boot.util.ImppRedis;
@ -37,7 +38,7 @@ public class AppStartSystemInit implements CommandLineRunner {
private ISystemInitService systemInitService; private ISystemInitService systemInitService;
@Autowired @Autowired
private static Environment environment; private Environment environment;
@Value("${spring.profiles.active}") @Value("${spring.profiles.active}")
private String SPRING_PROFILES_ACTIVE; private String SPRING_PROFILES_ACTIVE;
@ -77,6 +78,10 @@ public class AppStartSystemInit implements CommandLineRunner {
LOGGER.info("【IMPP-Core 加载 ElasticSearch中 ...】"); LOGGER.info("【IMPP-Core 加载 ElasticSearch中 ...】");
initImppElasticSearch(); initImppElasticSearch();
LOGGER.info("【IMPP-Core 加载 ElasticSearch完成】"); 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() { public SysLogTaskTimeRepository getSysLogTaskTimeRepository() {
if (logTaskTimeRDao == null && ImppSwitchUtil.isSwitchMongo()) { if (logTaskTimeRDao == null && ImppSwitchUtil.isSwitchMongo()) {
try {
logTaskTimeRDao = SpringContextsUtil.getBean(SysLogTaskTimeRepository.class); logTaskTimeRDao = SpringContextsUtil.getBean(SysLogTaskTimeRepository.class);
}catch (Exception e){
}
} }
if (logTaskTimeRDao == null) { if (logTaskTimeRDao == null) {
@ -74,7 +77,10 @@ public class SysLogMongoService implements ISysLogService {
public SysLogSystemRepository getSysLogSystemRepository() { public SysLogSystemRepository getSysLogSystemRepository() {
if (logSystemRDao == null && ImppSwitchUtil.isSwitchMongo()) { if (logSystemRDao == null && ImppSwitchUtil.isSwitchMongo()) {
try {
logSystemRDao = SpringContextsUtil.getBean(SysLogSystemRepository.class); logSystemRDao = SpringContextsUtil.getBean(SysLogSystemRepository.class);
}catch (Exception e){
}
} }
if (logSystemRDao == null) { if (logSystemRDao == null) {
@ -91,7 +97,10 @@ public class SysLogMongoService implements ISysLogService {
public SysLogOperateRepository getSysLogOperateRepository() { public SysLogOperateRepository getSysLogOperateRepository() {
if (logOperateRDao == null && ImppSwitchUtil.isSwitchMongo()) { if (logOperateRDao == null && ImppSwitchUtil.isSwitchMongo()) {
try {
logOperateRDao = SpringContextsUtil.getBean(SysLogOperateRepository.class); logOperateRDao = SpringContextsUtil.getBean(SysLogOperateRepository.class);
}catch (Exception e){
}
} }
if (logOperateRDao == null) { if (logOperateRDao == null) {
@ -108,7 +117,10 @@ public class SysLogMongoService implements ISysLogService {
public SysLogExceptionRepository getSysLogExceptionRepository() { public SysLogExceptionRepository getSysLogExceptionRepository() {
if (logExceptionRDao == null && ImppSwitchUtil.isSwitchMongo()) { if (logExceptionRDao == null && ImppSwitchUtil.isSwitchMongo()) {
try {
logExceptionRDao = SpringContextsUtil.getBean(SysLogExceptionRepository.class); logExceptionRDao = SpringContextsUtil.getBean(SysLogExceptionRepository.class);
}catch (Exception e){
}
} }
if (logExceptionRDao == null) { if (logExceptionRDao == null) {
@ -125,7 +137,10 @@ public class SysLogMongoService implements ISysLogService {
public MongoDbFactory getMongoDbFactory() { public MongoDbFactory getMongoDbFactory() {
if (mongoDbFactory == null && ImppSwitchUtil.isSwitchMongo()) { if (mongoDbFactory == null && ImppSwitchUtil.isSwitchMongo()) {
try {
mongoDbFactory = SpringContextsUtil.getBean(MongoDbFactory.class); mongoDbFactory = SpringContextsUtil.getBean(MongoDbFactory.class);
}catch (Exception e){
}
} }
if (mongoDbFactory == null) { if (mongoDbFactory == null) {

Loading…
Cancel
Save