Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
普蓝开源社区
盘古开发框架
提交
8de491ed
盘古开发框架
项目概览
普蓝开源社区
/
盘古开发框架
通知
25
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
1
Wiki
分析
仓库
DevOps
项目成员
Pages
盘古开发框架
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
1
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8de491ed
编写于
11月 15, 2021
作者:
X
xiongchun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增范例:创建一个基于盘古框架的空应用
上级
0c193e10
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
199 addition
and
2 deletion
+199
-2
pangu-examples/pangu-examples-empty-springboot-based/src/main/resources/application-dev.properties
...gboot-based/src/main/resources/application-dev.properties
+3
-1
pangu-examples/pangu-examples-empty/.gitignore
pangu-examples/pangu-examples-empty/.gitignore
+26
-0
pangu-examples/pangu-examples-empty/README.md
pangu-examples/pangu-examples-empty/README.md
+39
-0
pangu-examples/pangu-examples-empty/pom.xml
pangu-examples/pangu-examples-empty/pom.xml
+45
-0
pangu-examples/pangu-examples-empty/src/main/java/com/gitee/pulanos/pangu/showcases/empty/EmptyPanguApplication.java
.../pulanos/pangu/showcases/empty/EmptyPanguApplication.java
+47
-0
pangu-examples/pangu-examples-empty/src/main/resources/application-dev.properties
...mples-empty/src/main/resources/application-dev.properties
+20
-0
pangu-examples/pangu-examples-empty/src/main/resources/application.properties
...-examples-empty/src/main/resources/application.properties
+17
-0
pangu-examples/pom.xml
pangu-examples/pom.xml
+1
-0
pangu-framework-spring-boot-starter/src/main/java/com/gitee/pulanos/pangu/framework/Constants.java
...ain/java/com/gitee/pulanos/pangu/framework/Constants.java
+1
-1
未找到文件。
pangu-examples/pangu-examples-empty-springboot-based/src/main/resources/application-dev.properties
浏览文件 @
8de491ed
...
...
@@ -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
pangu-examples/pangu-examples-empty/.gitignore
0 → 100644
浏览文件 @
8de491ed
/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/
pangu-examples/pangu-examples-empty/README.md
0 → 100644
浏览文件 @
8de491ed
#### :mushroom: 本范例演示功能
1.
创建一个基于盘古框架的空应用
#### :four_leaf_clover: 如何创建&启动一个盘古应用
-
**第一步:安装pom依赖**
```
xml
<parent>
<groupId>
com.gitee.pulanos.pangu
</groupId>
<artifactId>
pangu-framework-parent
</artifactId>
<version>
latest.version.xxx
</version>
<relativePath/>
</parent>
```
```
xml
<dependency>
<groupId>
com.gitee.pulanos.pangu
</groupId>
<artifactId>
pangu-framework-spring-boot-starter
</artifactId>
</dependency>
```
-
**第二步:启动类**
采用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
(
"这是一个基于盘古开发框架的空应用..."
);
}
}
}
```
pangu-examples/pangu-examples-empty/pom.xml
0 → 100644
浏览文件 @
8de491ed
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
com.gitee.pulanos.pangu
</groupId>
<artifactId>
pangu-framework-parent
</artifactId>
<version>
5.0.7
</version>
<relativePath/>
</parent>
<groupId>
com.gitee.pulanos.pangu
</groupId>
<artifactId>
pangu-examples-empty
</artifactId>
<packaging>
jar
</packaging>
<version>
1.0.0
</version>
<dependencies>
<dependency>
<groupId>
com.gitee.pulanos.pangu
</groupId>
<artifactId>
pangu-framework-spring-boot-starter
</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<version>
${spring-boot-maven-plugin.version}
</version>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>
${maven-compiler-plugin.version}
</version>
<configuration>
<source>
1.8
</source>
<target>
1.8
</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
pangu-examples/pangu-examples-empty/src/main/java/com/gitee/pulanos/pangu/showcases/empty/EmptyPanguApplication.java
0 → 100644
浏览文件 @
8de491ed
/*
* 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
(
"这是一个基于盘古开发框架的空应用..."
);
}
}
}
pangu-examples/pangu-examples-empty/src/main/resources/application-dev.properties
0 → 100644
浏览文件 @
8de491ed
#
# 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
pangu-examples/pangu-examples-empty/src/main/resources/application.properties
0 → 100644
浏览文件 @
8de491ed
#
# 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
pangu-examples/pom.xml
浏览文件 @
8de491ed
...
...
@@ -12,6 +12,7 @@
<modules>
<module>
pangu-examples-empty-springboot-based
</module>
<module>
pangu-examples-empty
</module>
<module>
pangu-examples-config-remote-nacos
</module>
<module>
pangu-examples-webapi
</module>
<module>
pangu-examples-crud
</module>
...
...
pangu-framework-spring-boot-starter/src/main/java/com/gitee/pulanos/pangu/framework/Constants.java
浏览文件 @
8de491ed
...
...
@@ -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 ㊥ 盘古开发框架启动成功"
;
/**
* 应用退出
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录