Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
普蓝开源社区
盘古开发框架
提交
5ef46b4c
盘古开发框架
项目概览
普蓝开源社区
/
盘古开发框架
通知
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,发现更多精彩内容 >>
提交
5ef46b4c
编写于
12月 17, 2021
作者:
X
xiongchun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改范例 将参数配置中心配置改为本地配置,方便演示和阅读代码。仅保留演示配置中心功能的范例使用配置中心来配置参数。
上级
8d44c50e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
6 addition
and
36 deletion
+6
-36
pangu-examples/pangu-examples-cache-layering/README.md
pangu-examples/pangu-examples-cache-layering/README.md
+6
-36
未找到文件。
pangu-examples/pangu-examples-cache-layering/README.md
浏览文件 @
5ef46b4c
#### :mushroom: 本范例演示功能
1.
创建一个基于盘古框架的空应用
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
(
"这是一个基于盘古开发框架的空应用..."
);
}
}
}
```
> 盘古缓存基于layering cache开发。
>
> layering-cache是一个支持分布式环境的多级缓存框架,使用方式和spring-cache类似。它使用Caffeine作为一级本地缓存,redis作为二级集中式缓存。一级缓存和二级缓存的数据一致性是通过推和拉两种模式相结合的方式来保证。
**更多开发指南请参考盘古平台相关文档说明。**
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录