Files
ruoyi-java/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
2025-11-05 23:51:39 +08:00

38 lines
1.4 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.ruoyi;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableScheduling;
/**
* 启动程序
*
* @author ruoyi
*/
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
@EnableScheduling
public class RuoYiApplication
{
public static void main(String[] args)
{
// System.setProperty("spring.devtools.restart.enabled", "false");
// 禁用系统代理确保腾讯文档API调用直接连接
System.setProperty("java.net.useSystemProxies", "false");
System.clearProperty("http.proxyHost");
System.clearProperty("http.proxyPort");
System.clearProperty("https.proxyHost");
System.clearProperty("https.proxyPort");
ConfigurableApplicationContext context = SpringApplication.run(RuoYiApplication.class, args);
Environment env =context.getEnvironment();
System.out.println("实际加载的端口:" + env.getProperty("server.port"));
System.out.println("已禁用系统代理设置腾讯文档API将直接连接");
}
}