| | |
| | | import org.springframework.context.annotation.ComponentScan; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.util.TimeZone; |
| | | |
| | | /** |
| | | * @author lgh |
| | | */ |
| | |
| | | public class WebApplication extends SpringBootServletInitializer { |
| | | |
| | | public static void main(String[] args) { |
| | | |
| | | // 禁用 SSL 证书验证 |
| | | System.setProperty("jdk.internal.httpclient.disableHostnameVerification", "true"); |
| | | SpringApplication.run(WebApplication.class, args); |
| | | } |
| | | |
| | | @PostConstruct |
| | | void init() { |
| | | // 强制设置默认时区(影响整个JVM) |
| | | TimeZone.setDefault(TimeZone.getTimeZone("America/Mexico_City")); |
| | | System.setProperty("user.timezone", "America/Mexico_City"); |
| | | } |
| | | |
| | | @Override |
| | | protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { |
| | | |