From 8de491ed748a759916f016e74cc8ab3676df70b2 Mon Sep 17 00:00:00 2001
From: xiongchun <18616786188@qq.com>
Date: Mon, 15 Nov 2021 17:42:00 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=8C=83=E4=BE=8B=EF=BC=9A?=
=?UTF-8?q?=E5=88=9B=E5=BB=BA=E4=B8=80=E4=B8=AA=E5=9F=BA=E4=BA=8E=E7=9B=98?=
=?UTF-8?q?=E5=8F=A4=E6=A1=86=E6=9E=B6=E7=9A=84=E7=A9=BA=E5=BA=94=E7=94=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../main/resources/application-dev.properties | 4 +-
.../pangu-examples-empty/.gitignore | 26 ++++++++++
pangu-examples/pangu-examples-empty/README.md | 39 +++++++++++++++
pangu-examples/pangu-examples-empty/pom.xml | 45 ++++++++++++++++++
.../empty/EmptyPanguApplication.java | 47 +++++++++++++++++++
.../main/resources/application-dev.properties | 20 ++++++++
.../src/main/resources/application.properties | 17 +++++++
pangu-examples/pom.xml | 1 +
.../pulanos/pangu/framework/Constants.java | 2 +-
9 files changed, 199 insertions(+), 2 deletions(-)
create mode 100644 pangu-examples/pangu-examples-empty/.gitignore
create mode 100644 pangu-examples/pangu-examples-empty/README.md
create mode 100644 pangu-examples/pangu-examples-empty/pom.xml
create mode 100644 pangu-examples/pangu-examples-empty/src/main/java/com/gitee/pulanos/pangu/showcases/empty/EmptyPanguApplication.java
create mode 100644 pangu-examples/pangu-examples-empty/src/main/resources/application-dev.properties
create mode 100644 pangu-examples/pangu-examples-empty/src/main/resources/application.properties
diff --git a/pangu-examples/pangu-examples-empty-springboot-based/src/main/resources/application-dev.properties b/pangu-examples/pangu-examples-empty-springboot-based/src/main/resources/application-dev.properties
index 40d2c8b2a..37f373e35 100644
--- a/pangu-examples/pangu-examples-empty-springboot-based/src/main/resources/application-dev.properties
+++ b/pangu-examples/pangu-examples-empty-springboot-based/src/main/resources/application-dev.properties
@@ -14,4 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-spring.application.name=pangu-showcases-empty-springboot-based
\ No newline at end of file
+spring.application.name=pangu-showcases-empty-springboot-based
+
+logging.level.root=INFO
\ No newline at end of file
diff --git a/pangu-examples/pangu-examples-empty/.gitignore b/pangu-examples/pangu-examples-empty/.gitignore
new file mode 100644
index 000000000..c28c61a9c
--- /dev/null
+++ b/pangu-examples/pangu-examples-empty/.gitignore
@@ -0,0 +1,26 @@
+/target/
+/bin/
+!.mvn/wrapper/maven-wrapper.jar
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/build/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
diff --git a/pangu-examples/pangu-examples-empty/README.md b/pangu-examples/pangu-examples-empty/README.md
new file mode 100644
index 000000000..184d8aeec
--- /dev/null
+++ b/pangu-examples/pangu-examples-empty/README.md
@@ -0,0 +1,39 @@
+#### :mushroom: 本范例演示功能
+
+1.创建一个基于盘古框架的空应用
+
+#### :four_leaf_clover: 如何创建&启动一个盘古应用
+- **第一步:安装pom依赖**
+ ``` xml
+
+ com.gitee.pulanos.pangu
+ pangu-framework-parent
+ latest.version.xxx
+
+
+ ```
+ ```xml
+
+ com.gitee.pulanos.pangu
+ pangu-framework-spring-boot-starter
+
+ ```
+- **第二步:启动类**
+
+ 采用SpringBoot标准启动方式启动。
+
+ ``` java
+ @SpringBootApplication
+ public class EmptyPanguApplication {
+ public static void main(String[] args) {
+ PanGuApplicationBuilder.init(EmptyPanguApplication.class).run(args);
+ }
+ @Component
+ public class EmptyService{
+ @PostConstruct
+ public void print(){
+ log.info("这是一个基于盘古开发框架的空应用...");
+ }
+ }
+ }
+ ```
diff --git a/pangu-examples/pangu-examples-empty/pom.xml b/pangu-examples/pangu-examples-empty/pom.xml
new file mode 100644
index 000000000..f10deefde
--- /dev/null
+++ b/pangu-examples/pangu-examples-empty/pom.xml
@@ -0,0 +1,45 @@
+
+
+ 4.0.0
+
+
+ com.gitee.pulanos.pangu
+ pangu-framework-parent
+ 5.0.7
+
+
+
+ com.gitee.pulanos.pangu
+ pangu-examples-empty
+ jar
+ 1.0.0
+
+
+
+ com.gitee.pulanos.pangu
+ pangu-framework-spring-boot-starter
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring-boot-maven-plugin.version}
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ ${maven-compiler-plugin.version}
+
+ 1.8
+ 1.8
+
+
+
+
+
+
diff --git a/pangu-examples/pangu-examples-empty/src/main/java/com/gitee/pulanos/pangu/showcases/empty/EmptyPanguApplication.java b/pangu-examples/pangu-examples-empty/src/main/java/com/gitee/pulanos/pangu/showcases/empty/EmptyPanguApplication.java
new file mode 100644
index 000000000..283480832
--- /dev/null
+++ b/pangu-examples/pangu-examples-empty/src/main/java/com/gitee/pulanos/pangu/showcases/empty/EmptyPanguApplication.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 com.gitee.pulanos.pangu.showcases.empty;
+
+import com.gitee.pulanos.pangu.framework.PanGuApplicationBuilder;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.PostConstruct;
+
+/**
+ * @author xiongchun
+ */
+@Slf4j
+@SpringBootApplication
+public class EmptyPanguApplication {
+
+ public static void main(String[] args) {
+ PanGuApplicationBuilder.init(EmptyPanguApplication.class).run(args);
+ }
+
+ @Component
+ public class EmptyService{
+ @PostConstruct
+ public void print(){
+ log.info("这是一个基于盘古开发框架的空应用...");
+ }
+ }
+
+}
diff --git a/pangu-examples/pangu-examples-empty/src/main/resources/application-dev.properties b/pangu-examples/pangu-examples-empty/src/main/resources/application-dev.properties
new file mode 100644
index 000000000..cbd44e846
--- /dev/null
+++ b/pangu-examples/pangu-examples-empty/src/main/resources/application-dev.properties
@@ -0,0 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+spring.application.name=pangu-examples-empty
+
+logging.level.root=INFO
+logging.level.com.gitee.pulanos.pangu=INFO
\ No newline at end of file
diff --git a/pangu-examples/pangu-examples-empty/src/main/resources/application.properties b/pangu-examples/pangu-examples-empty/src/main/resources/application.properties
new file mode 100644
index 000000000..3ed9e2dbd
--- /dev/null
+++ b/pangu-examples/pangu-examples-empty/src/main/resources/application.properties
@@ -0,0 +1,17 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+spring.profiles.active=${spring.profiles.active:dev}
\ No newline at end of file
diff --git a/pangu-examples/pom.xml b/pangu-examples/pom.xml
index 91cfb1c25..948d3a00c 100644
--- a/pangu-examples/pom.xml
+++ b/pangu-examples/pom.xml
@@ -12,6 +12,7 @@
pangu-examples-empty-springboot-based
+ pangu-examples-emptypangu-examples-config-remote-nacospangu-examples-webapipangu-examples-crud
diff --git a/pangu-framework-spring-boot-starter/src/main/java/com/gitee/pulanos/pangu/framework/Constants.java b/pangu-framework-spring-boot-starter/src/main/java/com/gitee/pulanos/pangu/framework/Constants.java
index a44121269..512d4d644 100644
--- a/pangu-framework-spring-boot-starter/src/main/java/com/gitee/pulanos/pangu/framework/Constants.java
+++ b/pangu-framework-spring-boot-starter/src/main/java/com/gitee/pulanos/pangu/framework/Constants.java
@@ -75,7 +75,7 @@ public final class Constants {
/**
* 应用启动成功
*/
- public final static String APP_START_SUCCESS = "(ô‿ô) PanGu Dev Framework Started successfully ㊥ 盘古开发框架启动成功\\0";
+ public final static String APP_START_SUCCESS = "(ô‿ô) PanGu Dev Framework Started successfully ㊥ 盘古开发框架启动成功";
/**
* 应用退出
*/
--
GitLab