old mode 100644
new mode 100755
| | |
| | | import org.springframework.context.ApplicationContext; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.http.converter.StringHttpMessageConverter; |
| | | import org.springframework.scheduling.annotation.EnableAsync; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | |
| | | import java.nio.charset.Charset; |
| | |
| | | "com.java110.intf.order", |
| | | "com.java110.intf.store", |
| | | "com.java110.intf.report", |
| | | "com.java110.intf.goods", |
| | | "com.java110.intf.goods" |
| | | }) |
| | | @EnableScheduling |
| | | @EnableAsync |
| | | public class JobServiceApplication { |
| | | private static Logger logger = LoggerFactory.getLogger(JobServiceApplication.class); |
| | | |
| | |
| | | return restTemplate; |
| | | } |
| | | |
| | | @Bean |
| | | //@LoadBalanced |
| | | public RestTemplate formRestTemplate() { |
| | | RestTemplate restTemplate = new RestTemplate(); |
| | | restTemplate.getMessageConverters().add(new StringHttpMessageConverter(Charset.forName("UTF-8"))); |
| | | return restTemplate; |
| | | } |
| | | |
| | | /** |
| | | * 实例化RestTemplate,通过@LoadBalanced注解开启均衡负载能力. |
| | | * |