| | |
| | | package com.java110.job; |
| | | |
| | | import com.java110.core.annotation.Java110ListenerDiscovery; |
| | | import com.java110.core.trace.Java110RestTemplateInterceptor; |
| | | import com.java110.core.client.RestTemplate; |
| | | import com.java110.core.event.service.BusinessServiceDataFlowEventPublishing; |
| | | import com.java110.service.init.ServiceStartInit; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.boot.web.client.RestTemplateBuilder; |
| | |
| | | import org.springframework.scheduling.annotation.EnableAsync; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.nio.charset.Charset; |
| | | |
| | | @SpringBootApplication( |
| | |
| | | "com.java110.intf.order", |
| | | "com.java110.intf.store", |
| | | "com.java110.intf.report", |
| | | "com.java110.intf.acct", |
| | | "com.java110.intf.oa", |
| | | "com.java110.intf.goods" |
| | | }) |
| | | @EnableScheduling |
| | |
| | | |
| | | private static final String LISTENER_PATH = "java110.job.listeners"; |
| | | |
| | | @Resource |
| | | private Java110RestTemplateInterceptor java110RestTemplateInterceptor; |
| | | |
| | | @Bean |
| | | public RestTemplate outRestTemplate() { |
| | | StringHttpMessageConverter m = new StringHttpMessageConverter(Charset.forName("UTF-8")); |
| | | RestTemplate restTemplate = new RestTemplateBuilder().additionalMessageConverters(m).build(RestTemplate.class); |
| | | restTemplate.getInterceptors().add(java110RestTemplateInterceptor); |
| | | return restTemplate; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | ServiceStartInit.preInitSystemConfig(); |
| | | ApplicationContext context = SpringApplication.run(JobServiceApplication.class, args); |
| | | ServiceStartInit.initSystemConfig(context); |
| | | //加载业务侦听 |