java110
2020-06-01 42f4246ff22f871b7cee15113cbe7523de8ab578
FrontService/src/main/java/com/java110/front/FrontServiceApplicationStart.java
@@ -1,7 +1,6 @@
package com.java110.front;
import com.java110.service.init.ServiceStartInit;
import com.java110.front.core.VueComponentTemplate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
@@ -10,6 +9,7 @@
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;
@@ -28,15 +28,11 @@
 * @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"
})
@@ -54,7 +50,7 @@
     * @return restTemplate
     */
    @Bean
    //@LoadBalanced
    @LoadBalanced
    public RestTemplate restTemplate() {
        StringHttpMessageConverter m = new StringHttpMessageConverter(Charset.forName("UTF-8"));
        RestTemplate restTemplate = new RestTemplateBuilder().additionalMessageConverters(m).build();
@@ -67,8 +63,8 @@
            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);
        }
    }
}