|
|
@@ -43,6 +43,17 @@ public class UserServiceApplicationStart {
|
|
|
|
|
|
private static final String LISTENER_PATH = "java110.UserService.listeners";
|
|
|
|
|
|
+ public static void main(String[] args) throws Exception {
|
|
|
+ try {
|
|
|
+ ApplicationContext context = SpringApplication.run(UserServiceApplicationStart.class, args);
|
|
|
+ ServiceStartInit.initSystemConfig(context);
|
|
|
+ //加载业务侦听
|
|
|
+ // SystemStartLoadBusinessConfigure.initSystemConfig(LISTENER_PATH);
|
|
|
+ } catch (Throwable e) {
|
|
|
+ logger.error("系统启动失败", e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 实例化RestTemplate,通过@LoadBalanced注解开启均衡负载能力.
|
|
|
*
|
|
|
@@ -55,15 +66,4 @@ public class UserServiceApplicationStart {
|
|
|
RestTemplate restTemplate = new RestTemplateBuilder().additionalMessageConverters(m).build(RestTemplate.class);
|
|
|
return restTemplate;
|
|
|
}
|
|
|
-
|
|
|
- public static void main(String[] args) throws Exception {
|
|
|
- try {
|
|
|
- ApplicationContext context = SpringApplication.run(UserServiceApplicationStart.class, args);
|
|
|
- ServiceStartInit.initSystemConfig(context);
|
|
|
- //加载业务侦听
|
|
|
- // SystemStartLoadBusinessConfigure.initSystemConfig(LISTENER_PATH);
|
|
|
- } catch (Throwable e) {
|
|
|
- logger.error("系统启动失败", e);
|
|
|
- }
|
|
|
- }
|
|
|
}
|