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;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;
......@@ -35,7 +36,7 @@ import com.yeejoin.amos.filter.CrossDomainFilter;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
/**
*
*
* <pre>
* 服务启动类
* </pre>
......@@ -70,13 +71,15 @@ public class YeeAmosFireAutoSysStart implements ApplicationContextAware {
*/
public static void main(String[] args) {
log.info("start Service..........");
try {
SpringApplication application = new SpringApplication(YeeAmosFireAutoSysStart.class);
Environment environment = application.run(args).getEnvironment();
log.info("SwaggerUI: http://" + InetAddress.getLocalHost().getHostAddress() + ":" + environment.getProperty("server.port") + environment.getProperty("server.servlet.context-path") + "/swagger-ui.html");
} catch (Exception e) {
System.out.println("error occur when run server! " + e);
}
ApplicationContext context = SpringApplication.run(YeeAmosFireAutoSysStart.class, args);
Environment env = context.getEnvironment();
String appName = env.getProperty("spring.application.name");
log.info(
"\n----------------------------------------------------------\n\t"
+ "Application {} is running!\n"
+ "----------------------------------------------------------\n"
, appName
);
}
/**
......@@ -90,7 +93,7 @@ public class YeeAmosFireAutoSysStart implements ApplicationContextAware {
}
/**
*
*
* <pre>
* 跨域处理的FilterBean
* </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