| | |
| | | package com.stylefeng.guns; |
| | | |
| | | import com.stylefeng.guns.modular.system.util.GDFalconUtil; |
| | | import org.apache.http.client.HttpClient; |
| | | import org.apache.http.config.SocketConfig; |
| | | import org.apache.http.impl.client.HttpClientBuilder; |
| | | import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.boot.builder.SpringApplicationBuilder; |
| | | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; |
| | | import org.springframework.cloud.client.loadbalancer.LoadBalanced; |
| | | import org.springframework.cloud.netflix.eureka.EnableEurekaClient; |
| | | import org.springframework.context.annotation.Bean; |
| | |
| | | import org.springframework.transaction.annotation.EnableTransactionManagement; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.TimeZone; |
| | | |
| | | /** |
| | | * SpringBoot方式启动类 |
| | |
| | | |
| | | public static void main(String[] args) { |
| | | SpringApplication.run(GunsApplication.class, args); |
| | | //启动定时任务调度器 |
| | | // QuartzUtil.start(GunsApplication.class.getClassLoader().getResourceAsStream("quartz.properties")); |
| | | logger.info("GunsApplication is success!"); |
| | | } |
| | | |
| | | GDFalconUtil gdFalconUtil = new GDFalconUtil(); |
| | | gdFalconUtil.init();//初始化猎鹰服务 |
| | | |
| | | @PostConstruct |
| | | void started() { |
| | | TimeZone.setDefault(TimeZone.getTimeZone("GMT+0")); |
| | | } |
| | | |
| | | |