From 01ea40addd6ec755c33a28e4ce28da64087c322a Mon Sep 17 00:00:00 2001 From: yanghb <yanghb> Date: 星期三, 29 三月 2023 10:21:28 +0800 Subject: [PATCH] init --- DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/DispatchServletInitializer.java | 4 ++-- DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/code/factory/DefaultTemplateFactory.java | 4 ++-- DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/DispatchApplication.java | 12 ++++++++---- DispatchTravel/guns-admin/src/main/resources/application.yml | 2 +- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/GunsApplication.java b/DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/DispatchApplication.java similarity index 92% rename from DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/GunsApplication.java rename to DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/DispatchApplication.java index d01eb0f..906c34c 100644 --- a/DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/GunsApplication.java +++ b/DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/DispatchApplication.java @@ -26,13 +26,17 @@ */ @EnableEurekaClient//注册为服务提供者 @SpringBootApplication -public class GunsApplication { +public class DispatchApplication { - private final static Logger logger = LoggerFactory.getLogger(GunsApplication.class); + private final static Logger logger = LoggerFactory.getLogger(DispatchApplication.class); public static void main(String[] args) { - TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai")); - SpringApplication.run(GunsApplication.class, args); + try { + TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai")); + SpringApplication.run(DispatchApplication.class, args); + }catch (Exception e){ + e.printStackTrace(); + } logger.info("GunsApplication is success!"); } diff --git a/DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/GunsServletInitializer.java b/DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/DispatchServletInitializer.java similarity index 73% rename from DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/GunsServletInitializer.java rename to DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/DispatchServletInitializer.java index 18e63c5..2082394 100644 --- a/DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/GunsServletInitializer.java +++ b/DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/DispatchServletInitializer.java @@ -9,10 +9,10 @@ * @author fengshuonan * @date 2017-05-21 9:43 */ -public class GunsServletInitializer extends SpringBootServletInitializer { +public class DispatchServletInitializer extends SpringBootServletInitializer { @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { - return builder.sources(GunsApplication.class); + return builder.sources(DispatchApplication.class); } } diff --git a/DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/code/factory/DefaultTemplateFactory.java b/DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/code/factory/DefaultTemplateFactory.java index 1cebee4..e1c228f 100644 --- a/DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/code/factory/DefaultTemplateFactory.java +++ b/DispatchTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/code/factory/DefaultTemplateFactory.java @@ -1,7 +1,7 @@ package com.stylefeng.guns.modular.code.factory; -import com.stylefeng.guns.GunsApplication; +import com.stylefeng.guns.DispatchApplication; import com.stylefeng.guns.core.CoreFlag; import com.stylefeng.guns.core.util.ToolUtil; import com.stylefeng.guns.generator.action.model.GenQo; @@ -44,7 +44,7 @@ GenQo genQo = new GenQo(); genQo.setProjectPath(ToolUtil.getWebRootPath(null)); genQo.setAuthor("stylefeng"); - genQo.setProjectPackage(GunsApplication.class.getPackage().getName()); + genQo.setProjectPackage(DispatchApplication.class.getPackage().getName()); genQo.setCorePackage(CoreFlag.class.getPackage().getName()); genQo.setIgnoreTabelPrefix("sys_"); genQo.setModuleName("system"); diff --git a/DispatchTravel/guns-admin/src/main/resources/application.yml b/DispatchTravel/guns-admin/src/main/resources/application.yml index f5d9c62..7e49616 100644 --- a/DispatchTravel/guns-admin/src/main/resources/application.yml +++ b/DispatchTravel/guns-admin/src/main/resources/application.yml @@ -37,7 +37,7 @@ eureka: client: service-url: #注册中心地址 - defaultZone: http://sinata:sinata@127.0.0.1:8000/eureka #启用身份验证的方式连接 + defaultZone: http://127.0.0.1:8081/eureka #启用身份验证的方式连接 register-with-eureka: true #在注册中心进行注册 fetch-registry: true #从Eureka中获取注册信息。 -- Gitblit v1.7.1