diff --git a/LICENSE b/LICENSE index f6341370..ef4e4deb 100644 --- a/LICENSE +++ b/LICENSE @@ -176,7 +176,7 @@ recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2017 smallchill + Copyright 2019 smallchill Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -188,4 +188,4 @@ third-party archives. distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file + limitations under the License. diff --git a/README.md b/README.md index b1509ea8..dd35be71 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,11 @@ Apache Licence也是对商业应用友好的许可。使用者也可以在需要 # 界面一览 - + + + + + diff --git a/blade-auth/pom.xml b/blade-auth/pom.xml index 1261d83a..bb3775f3 100644 --- a/blade-auth/pom.xml +++ b/blade-auth/pom.xml @@ -18,6 +18,11 @@ + + org.springblade + blade-common + ${blade.project.version} + org.springblade blade-core-secure diff --git a/blade-common/pom.xml b/blade-common/pom.xml index 578ad9fe..e0eb45b3 100644 --- a/blade-common/pom.xml +++ b/blade-common/pom.xml @@ -14,6 +14,14 @@ ${blade.project.version} jar + + + org.springblade + blade-core-launch + ${blade.tool.version} + + + diff --git a/blade-common/src/main/java/org/springblade/common/config/BladeCommonConfiguration.java b/blade-common/src/main/java/org/springblade/common/config/BladeCommonConfiguration.java index 1b46381f..e8bfb1ab 100644 --- a/blade-common/src/main/java/org/springblade/common/config/BladeCommonConfiguration.java +++ b/blade-common/src/main/java/org/springblade/common/config/BladeCommonConfiguration.java @@ -17,8 +17,6 @@ package org.springblade.common.config; import lombok.AllArgsConstructor; -import org.springblade.common.tool.DictUtil; -import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** @@ -30,9 +28,4 @@ import org.springframework.context.annotation.Configuration; @AllArgsConstructor public class BladeCommonConfiguration { - @Bean - public DictUtil dictUtil() { - return new DictUtil(); - } - } diff --git a/blade-common/src/main/java/org/springblade/common/constant/CommonConstant.java b/blade-common/src/main/java/org/springblade/common/constant/CommonConstant.java index a42c0173..1d838a75 100644 --- a/blade-common/src/main/java/org/springblade/common/constant/CommonConstant.java +++ b/blade-common/src/main/java/org/springblade/common/constant/CommonConstant.java @@ -7,6 +7,21 @@ package org.springblade.common.constant; */ public interface CommonConstant { + /** + * consul dev 地址 + */ + String CONSUL_DEV_HOST = "http://localhost"; + + /** + * consul prod 地址 + */ + String CONSUL_PROD_HOST = "http://192.168.186.129"; + + /** + * consul端口 + */ + String CONSUL_PORT = "8500"; + /** * 顶级父节点id */ diff --git a/blade-common/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java b/blade-common/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java new file mode 100644 index 00000000..17a4229b --- /dev/null +++ b/blade-common/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springblade.common.launch; + +import org.springblade.common.constant.CommonConstant; +import org.springblade.core.launch.constant.AppConstant; +import org.springblade.core.launch.service.LauncherService; +import org.springframework.boot.builder.SpringApplicationBuilder; + +import java.util.Properties; + +/** + * 启动参数拓展 + * + * @author smallchil + */ +public class LauncherServiceImpl implements LauncherService { + + @Override + public void launcher(SpringApplicationBuilder builder, String appName, String profile) { + Properties props = System.getProperties(); + props.setProperty("spring.cloud.consul.host", profile.equals(AppConstant.DEV_CDOE) ? CommonConstant.CONSUL_DEV_HOST : CommonConstant.CONSUL_PROD_HOST); + props.setProperty("spring.cloud.consul.port", CommonConstant.CONSUL_PORT); + } + +} diff --git a/blade-common/src/main/java/org/springblade/common/tool/DictUtil.java b/blade-common/src/main/java/org/springblade/common/tool/DictUtil.java deleted file mode 100644 index c6e74c73..00000000 --- a/blade-common/src/main/java/org/springblade/common/tool/DictUtil.java +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com). - *

- * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - *

- * http://www.apache.org/licenses/LICENSE-2.0 - *

- * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springblade.common.tool; - -/** - * 字典工具类 - * - * @author Chill - */ -public class DictUtil { -} diff --git a/blade-common/src/main/resources/META-INF/services/org.springblade.core.launch.service.LauncherService b/blade-common/src/main/resources/META-INF/services/org.springblade.core.launch.service.LauncherService new file mode 100644 index 00000000..87512c9d --- /dev/null +++ b/blade-common/src/main/resources/META-INF/services/org.springblade.core.launch.service.LauncherService @@ -0,0 +1 @@ +org.springblade.common.launch.LauncherServiceImpl diff --git a/blade-gateway/pom.xml b/blade-gateway/pom.xml index c7aba8c8..c8b7b1cb 100644 --- a/blade-gateway/pom.xml +++ b/blade-gateway/pom.xml @@ -31,6 +31,17 @@ + + org.springblade + blade-common + ${blade.project.version} + + + org.springblade + blade-core-launch + + + org.springframework.cloud diff --git a/blade-ops/blade-admin/pom.xml b/blade-ops/blade-admin/pom.xml index 3ccb4ec9..162c7c75 100644 --- a/blade-ops/blade-admin/pom.xml +++ b/blade-ops/blade-admin/pom.xml @@ -16,6 +16,11 @@ + + org.springblade + blade-common + ${blade.project.version} + org.springblade blade-core-launch diff --git a/blade-ops/blade-config-server/pom.xml b/blade-ops/blade-config-server/pom.xml index 7548ac92..edf274f5 100644 --- a/blade-ops/blade-config-server/pom.xml +++ b/blade-ops/blade-config-server/pom.xml @@ -16,6 +16,11 @@ + + org.springblade + blade-common + ${blade.project.version} + org.springblade blade-core-launch diff --git a/pic/springblade-grafana.png b/pic/springblade-grafana.png new file mode 100644 index 00000000..9dc318d4 Binary files /dev/null and b/pic/springblade-grafana.png differ diff --git a/pic/springblade-k8s.png b/pic/springblade-k8s1.png similarity index 100% rename from pic/springblade-k8s.png rename to pic/springblade-k8s1.png diff --git a/pic/springblade-k8s2.png b/pic/springblade-k8s2.png new file mode 100644 index 00000000..d10ed87a Binary files /dev/null and b/pic/springblade-k8s2.png differ diff --git a/pom.xml b/pom.xml index ac98f911..a20be98e 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ pom - 1.0.0-RC2 + 1.0.0-RC3 2.0.0-RC1 1.8