Commit a7cdbee7 authored by 李秀明's avatar 李秀明

fix: 删除无用或无重大意义的获取IP的代码, 解决SCA扫描报告为漏洞问题

国家电网换流站消防管控中心建设工程(V1.1.5)-后端-SCA扫描报告.pdf p544~p570 Links https://docs.qq.com/sheet/DTkRSaWhSZXBlaldN?tab=000008&_t=1711087563249 (No.12)
parent 719f672a
...@@ -19,6 +19,7 @@ import org.springframework.cloud.netflix.hystrix.EnableHystrix; ...@@ -19,6 +19,7 @@ import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware; import org.springframework.context.ApplicationContextAware;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
...@@ -35,7 +36,7 @@ import com.yeejoin.amos.filter.CrossDomainFilter; ...@@ -35,7 +36,7 @@ import com.yeejoin.amos.filter.CrossDomainFilter;
import springfox.documentation.swagger2.annotations.EnableSwagger2; import springfox.documentation.swagger2.annotations.EnableSwagger2;
/** /**
* *
* <pre> * <pre>
* 服务启动类 * 服务启动类
* </pre> * </pre>
...@@ -70,13 +71,15 @@ public class YeeAmosFireAutoSysStart implements ApplicationContextAware { ...@@ -70,13 +71,15 @@ public class YeeAmosFireAutoSysStart implements ApplicationContextAware {
*/ */
public static void main(String[] args) { public static void main(String[] args) {
log.info("start Service.........."); log.info("start Service..........");
try { ApplicationContext context = SpringApplication.run(YeeAmosFireAutoSysStart.class, args);
SpringApplication application = new SpringApplication(YeeAmosFireAutoSysStart.class); Environment env = context.getEnvironment();
Environment environment = application.run(args).getEnvironment(); String appName = env.getProperty("spring.application.name");
log.info("SwaggerUI: http://" + InetAddress.getLocalHost().getHostAddress() + ":" + environment.getProperty("server.port") + environment.getProperty("server.servlet.context-path") + "/swagger-ui.html"); log.info(
} catch (Exception e) { "\n----------------------------------------------------------\n\t"
System.out.println("error occur when run server! " + e); + "Application {} is running!\n"
} + "----------------------------------------------------------\n"
, appName
);
} }
/** /**
...@@ -90,7 +93,7 @@ public class YeeAmosFireAutoSysStart implements ApplicationContextAware { ...@@ -90,7 +93,7 @@ public class YeeAmosFireAutoSysStart implements ApplicationContextAware {
} }
/** /**
* *
* <pre> * <pre>
* 跨域处理的FilterBean * 跨域处理的FilterBean
* </pre> * </pre>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment