From cc6354cee46ff8facbd16c8919f2616c9031acdb Mon Sep 17 00:00:00 2001 From: yuxc <yuxc@vci-tech.com> Date: 星期五, 21 六月 2024 10:19:59 +0800 Subject: [PATCH] 1、三元账号验证修改,以及获取数据修改 --- Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/initTask/VciWebInitTaskComponent.java | 80 ++------------------------------------- 1 files changed, 5 insertions(+), 75 deletions(-) diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/initTask/VciWebInitTaskComponent.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/initTask/VciWebInitTaskComponent.java index 8f0ec19..e2b4b4f 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/initTask/VciWebInitTaskComponent.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/initTask/VciWebInitTaskComponent.java @@ -12,7 +12,6 @@ import com.vci.starter.web.annotation.config.VciConfigModule; import com.vci.starter.web.enumpck.SessionStorageTypeEnum; import com.vci.starter.web.enumpck.UserSecretEnum; -import com.vci.starter.web.interceptor.VciSessionForLoginI; import com.vci.starter.web.pagemodel.SessionInfo; import com.vci.starter.web.properties.VciSessionProperties; import com.vci.starter.web.util.ApplicationContextProvider; @@ -22,10 +21,7 @@ import com.vci.web.properties.WebProperties; import com.vci.web.service.OsAttributeServiceI; import com.vci.web.service.VciMdServiceI; -import com.vci.web.service.WebSecretServiceI; import com.vci.web.service.impl.UIEngineServiceImpl; -import com.vci.web.service.impl.WebContextInfoFetcher; -import com.vci.web.service.impl.WebInitServiceImpl; import com.vci.web.util.PlatformClientUtil; import com.vci.web.util.WebUtil; import org.apache.commons.lang3.StringUtils; @@ -37,16 +33,14 @@ import org.springframework.boot.ApplicationRunner; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; -import org.springframework.util.ResourceUtils; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.util.*; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; import java.util.stream.Collectors; @@ -58,29 +52,16 @@ @Component public class VciWebInitTaskComponent implements ApplicationRunner { - /** * 鏃ュ織瀵硅薄 */ private Logger logger = LoggerFactory.getLogger(getClass()); /** - * 鍒濆鍖栫殑鏈嶅姟 - */ - @Autowired - private WebInitServiceImpl initService; - - /** * 鏄惁鍏煎 */ @Value("${user-table-compatibility:}") private String compatibility; - - /** - * 涓婁笅鏂囨敞鍐� - */ - @Autowired - private WebContextInfoFetcher contextInfoFetcher; /** * 閰嶇疆瀵硅薄 @@ -101,11 +82,6 @@ private VciSessionProperties sessionProperties; /** - * 浼氳瘽澶勭悊 - */ - @Autowired - private VciSessionForLoginI sessionForLogin; - /** * 寮曞叆鍏煎鐨勯厤缃� */ @Autowired(required = false) @@ -123,17 +99,6 @@ @Autowired private VciMdServiceI mdService; - /** - * 瀵嗙骇鏈嶅姟 - */ - @Autowired - private WebSecretServiceI secretService; - -// /** -// * corba鐨勫鎴风 -// */ -// @Autowired(required = false) -// private JacorbClientMapProperties jacorbClientMapProperties; /** * 鎵ц鍒濆鍖� @@ -142,14 +107,13 @@ @Override public void run(ApplicationArguments args) { initCompatibility(); - initCorbaFromConf(); initSysadmin(); initClearSession(); initSetting(); // secretService.getMinDataSecret(); // secretService.getMinIpSecret(); // secretService.getMinUserSecret(); - initService.clearAllCache(); +// initService.clearAllCache(); // initService.initServerCache(); mdService.scanAllMdFile(); initDefaultAttribute(); @@ -235,38 +199,6 @@ } /** - * 浠庡钩鍙扮殑閰嶇疆涓幏鍙朿onf鐨勪俊鎭� - */ - public void initCorbaFromConf(){ - File file = null; - try { - file = ResourceUtils.getFile("classpath:properties/corba.properties"); - } catch (FileNotFoundException e) { - try { - file = ResourceUtils.getFile("classpath:corba.properties"); - } catch (FileNotFoundException fileNotFoundException) { - logger.info("杩欎釜鐜閲屾病鏈夊瓨鏀惧钩鍙扮殑corba閰嶇疆鏂囦欢",fileNotFoundException); - } - } - try { - if (file.exists()) { - Properties properties = new Properties(); - properties.load(new FileInputStream(file)); - String url = properties.getProperty("NameService"); - String name = properties.getProperty("InstanceIdentity"); -// if (StringUtils.isNotBlank(url)) { -// jacorbClientMapProperties.setUrl(url); -// } -// if (StringUtils.isNotBlank(name)) { -// jacorbClientMapProperties.setInstanceIdentity(name); -// } - } - }catch (IOException e) { - logger.error("璇诲彇骞冲彴鐨刢orb閰嶇疆鏂囦欢鍑虹幇浜嗛敊璇�",e); - } - } - - /** * 鍒濆鍖栫敤鎴� */ public void initSysadmin(){ @@ -284,8 +216,6 @@ public void initSetting() { System.out.println("----鍒濆鍖栫敤浜庢煡璇㈤厤缃殑鐢ㄦ埛----"); ClientContextVariable.setClientLanuchMode(LaunchModeEnum.WebApp); -// InvocationUtility.registerIInvocationContext(contextInfoFetcher); -// JacorbClientRequestInterceptor.sessionContext = contextInfoFetcher; System.out.println("----鍒濆鍖栫敤浜庢煡璇㈤厤缃殑鐢ㄦ埛瀹屾垚----"); System.out.println("----寮�濮嬫壂鎻忔湁VciConfigModule娉ㄨВ鐨勭被----"); String[] namesForAnnotation = ApplicationContextProvider.getApplicationContext().getBeanNamesForAnnotation(VciConfigModule.class); -- Gitblit v1.9.3