| | |
| | | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; |
| | | import org.springframework.boot.web.client.RestTemplateBuilder; |
| | | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; |
| | | import org.springframework.cloud.client.loadbalancer.LoadBalanced; |
| | | import org.springframework.context.ApplicationContext; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.http.converter.StringHttpMessageConverter; |
| | |
| | | * @tag |
| | | */ |
| | | @SpringBootApplication(scanBasePackages = { |
| | | "com.java110.front.aop", |
| | | "com.java110.service.configuration", |
| | | "com.java110.front.configuration", |
| | | "com.java110.front.filter", |
| | | "com.java110.service.init", |
| | | "com.java110.app", |
| | | "com.java110.front", |
| | | "com.java110.core", |
| | | "com.java110.config.properties.code", |
| | | "com.java110.cache", |
| | | "com.java110.report" |
| | | }) |
| | | |
| | |
| | | * @return restTemplate |
| | | */ |
| | | @Bean |
| | | //@LoadBalanced |
| | | @LoadBalanced |
| | | public RestTemplate restTemplate() { |
| | | StringHttpMessageConverter m = new StringHttpMessageConverter(Charset.forName("UTF-8")); |
| | | RestTemplate restTemplate = new RestTemplateBuilder().additionalMessageConverters(m).build(); |
| | |
| | | ApplicationContext context = SpringApplication.run(FrontServiceApplicationStart.class, args); |
| | | ServiceStartInit.initSystemConfig(context); |
| | | //VueComponentTemplate.initComponent(VueComponentTemplate.DEFAULT_COMPONENT_PACKAGE_PATH); |
| | | }catch (Throwable e){ |
| | | logger.error("系统启动失败",e); |
| | | } catch (Throwable e) { |
| | | logger.error("系统启动失败", e); |
| | | } |
| | | } |
| | | } |