| | |
| | | |
| | | import com.java110.core.annotation.Java110CmdDiscovery; |
| | | import com.java110.core.annotation.Java110ListenerDiscovery; |
| | | import com.java110.core.trace.Java110RestTemplateInterceptor; |
| | | import com.java110.core.client.RestTemplate; |
| | | import com.java110.core.event.cmd.ServiceCmdEventPublishing; |
| | | import com.java110.core.event.service.BusinessServiceDataFlowEventPublishing; |
| | |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.http.converter.StringHttpMessageConverter; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.nio.charset.Charset; |
| | | |
| | | |
| | |
| | | |
| | | private static final String LISTENER_PATH = "java110.UserService.listeners"; |
| | | |
| | | @Resource |
| | | private Java110RestTemplateInterceptor java110RestTemplateInterceptor; |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | try { |
| | | ServiceStartInit.preInitSystemConfig(); |
| | |
| | | public RestTemplate restTemplate() { |
| | | StringHttpMessageConverter m = new StringHttpMessageConverter(Charset.forName("UTF-8")); |
| | | RestTemplate restTemplate = new RestTemplateBuilder().additionalMessageConverters(m).build(RestTemplate.class); |
| | | restTemplate.getInterceptors().add(java110RestTemplateInterceptor); |
| | | return restTemplate; |
| | | } |
| | | } |