Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
普蓝开源社区
盘古开发框架
提交
25e6e52a
盘古开发框架
项目概览
普蓝开源社区
/
盘古开发框架
通知
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,体验更适合开发者的 AI 搜索 >>
提交
25e6e52a
编写于
6月 18, 2022
作者:
X
xiongchun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修正MP日志自定义问题
上级
baae5845
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
49 addition
and
29 deletion
+49
-29
pangu-examples/pangu-examples-crud/pom.xml
pangu-examples/pangu-examples-crud/pom.xml
+1
-1
pangu-examples/pangu-examples-crud/src/main/java/com/gitee/pulanos/pangu/showcases/crud/service/CrudService.java
...tee/pulanos/pangu/showcases/crud/service/CrudService.java
+1
-5
pangu-examples/pangu-examples-crud/src/main/resources/application-dev.properties
...amples-crud/src/main/resources/application-dev.properties
+1
-1
pangu-examples/pangu-examples-dubbo-gateway-shenyu-service/pom.xml
...mples/pangu-examples-dubbo-gateway-shenyu-service/pom.xml
+2
-2
pangu-examples/pangu-examples-dubbo-service/pom.xml
pangu-examples/pangu-examples-dubbo-service/pom.xml
+4
-0
pangu-examples/pangu-examples-shardingsphere-sharding/src/main/resources/application-sharding-tables.properties
...src/main/resources/application-sharding-tables.properties
+1
-1
pangu-examples/pangu-examples-webapi-local-service-based/src/main/resources/application-dev.properties
...rvice-based/src/main/resources/application-dev.properties
+1
-1
pangu-website/README.md
pangu-website/README.md
+20
-6
pangu-website/docs/advanced-guide/配置中心.md
pangu-website/docs/advanced-guide/配置中心.md
+18
-12
未找到文件。
pangu-examples/pangu-examples-crud/pom.xml
浏览文件 @
25e6e52a
...
...
@@ -7,7 +7,7 @@
<parent>
<groupId>
com.gitee.pulanos.pangu
</groupId>
<artifactId>
pangu-parent
</artifactId>
<version>
5.
0.8
</version>
<version>
5.
1.0
</version>
<relativePath/>
</parent>
...
...
pangu-examples/pangu-examples-crud/src/main/java/com/gitee/pulanos/pangu/showcases/crud/service/CrudService.java
浏览文件 @
25e6e52a
...
...
@@ -20,14 +20,10 @@ package com.gitee.pulanos.pangu.showcases.crud.service;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.lang.Console
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.gitee.pulanos.pangu.showcases.crud.dao.entity.UserEntity
;
import
com.gitee.pulanos.pangu.showcases.crud.dao.mapper.CrudMapper
;
import
com.gitee.pulanos.pangu.showcases.crud.dao.mapper.UserMapper
;
import
com.google.common.collect.Maps
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
pangu-examples/pangu-examples-crud/src/main/resources/application-dev.properties
浏览文件 @
25e6e52a
...
...
@@ -22,7 +22,7 @@ spring.datasource.url=jdbc:mysql://localhost:3306/pangu-examples?useUnicode=true
spring.datasource.username
=
root
spring.datasource.password
=
root123456
mybatis-plus.mapperLocations
=
classpath*:/mapper/**/*.xml
mybatis-plus.configuration.log-impl
=
org.apache.ibatis.logging.s
tdout.StdOut
Impl
mybatis-plus.configuration.log-impl
=
org.apache.ibatis.logging.s
lf4j.Slf4j
Impl
pangu.jdbc.db-type
=
mysql
logging.level.root
=
INFO
...
...
pangu-examples/pangu-examples-dubbo-gateway-shenyu-service/pom.xml
浏览文件 @
25e6e52a
...
...
@@ -7,12 +7,12 @@
<parent>
<groupId>
com.gitee.pulanos.pangu
</groupId>
<artifactId>
pangu-parent
</artifactId>
<version>
5.0.
7
</version>
<version>
5.0.
8
</version>
<relativePath/>
</parent>
<groupId>
com.gitee.pulanos.pangu
</groupId>
<artifactId>
pangu-examples-dubbo-gateway-service
</artifactId>
<artifactId>
pangu-examples-dubbo-gateway-s
henyu-s
ervice
</artifactId>
<packaging>
jar
</packaging>
<version>
1.0.0
</version>
...
...
pangu-examples/pangu-examples-dubbo-service/pom.xml
浏览文件 @
25e6e52a
...
...
@@ -30,6 +30,10 @@
<artifactId>
pangu-examples-dubbo-api
</artifactId>
<version>
1.0.0
</version>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
</dependency>
</dependencies>
<build>
...
...
pangu-examples/pangu-examples-shardingsphere-sharding/src/main/resources/application-sharding-tables.properties
浏览文件 @
25e6e52a
...
...
@@ -16,7 +16,7 @@
#
spring.application.name
=
pangu-examples-shardingsphere-sharding
mybatis-plus.mapperLocations
=
classpath*:/mapper/**/*.xml
mybatis-plus.configuration.log-impl
=
org.apache.ibatis.logging.s
tdout.StdOut
Impl
mybatis-plus.configuration.log-impl
=
org.apache.ibatis.logging.s
lf4j.Slf4j
Impl
spring.shardingsphere.mode.type
=
Memory
# print shardingsphere Actual SQL log
...
...
pangu-examples/pangu-examples-webapi-local-service-based/src/main/resources/application-dev.properties
浏览文件 @
25e6e52a
...
...
@@ -24,7 +24,7 @@ spring.datasource.url=jdbc:mysql://localhost:3306/pangu-examples?useUnicode=true
spring.datasource.username
=
root
spring.datasource.password
=
root123456
mybatis-plus.mapperLocations
=
classpath*:/mapper/**/*.xml
mybatis-plus.configuration.log-impl
=
org.apache.ibatis.logging.s
tdout.StdOut
Impl
mybatis-plus.configuration.log-impl
=
org.apache.ibatis.logging.s
lf4j.Slf4j
Impl
# \u5206\u9875SQL\u65B9\u8A00\u6570\u636E\u5E93\u7C7B\u578B\u6807\u8BC6\uFF08\u7F3A\u7701\uFF1A\u81EA\u52A8\u8BC6\u522B\uFF09
pangu.jdbc.db-type
=
mysql
...
...
pangu-website/README.md
浏览文件 @
25e6e52a
###
介绍
###
Install
[
盘古开发框架
](
https://pulanos.gitee.io/pangu-framework/
)
是完全独立于 Spring Cloud 生态的一套轻量灵活、成熟可靠的工业级分布式微服务开发和治理框架(兼容垂直单体分层架构)。它基于 Apache-2.0 协议
**开源**
发布,且是
**免费**
的。我们希望不仅是开源的受益者,也能成为开源的贡献者,与开源社区一起「共建共享开源生态」。
```
$ npm install
```
### 更多资源
This command will install node_modules to the project.
:maple_leaf:
[
项目主页&开发指南(主)
](
https://pulanos.gitee.io/pangu-framework/
)
:leaves:
[
项目主页&开发指南(备)
](
https://xiongchun.github.io/pangu-framework/
)
:sunflower:
[
开发范例集合
](
https://pulanos.gitee.io/pangu-framework/docs/examples-list
)
\ No newline at end of file
### Local Development
```
$ npm start
```
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
### Build & Deploy
```
$ npm run build
```
This command generates static content into the
`build`
directory and can be served using any static contents hosting service.
\ No newline at end of file
pangu-website/docs/advanced-guide/配置中心.md
浏览文件 @
25e6e52a
...
...
@@ -52,11 +52,14 @@ Nacos 中的某个配置集的 ID。配置集 ID 是组织划分配置的维度
Nacos 的客户端 SDK 会在本地生成配置的快照。当客户端无法连接到 Nacos Server 时,可以使用配置快照显示系统的整体容灾能力。配置快照类似于 Git 中的本地 commit,也类似于缓存,会在适当的时机更新,但是并没有缓存过期( expiration )的概念。
### 本地配置与配置中心对比
本地配置(配置文件) | 配置中心
--- | ---
配置分散、与应用耦合、静态配置 | 配置集中、外部化、动态化实时生效
无环境隔离无版本支持,容易引发生产事故 | 多环境隔离多版本支持,较安全
无安全审计 | 配置权限控制、操作变更审计
-
**本地配置(配置文件)**
-
配置分散、与应用耦合、静态配置
-
无环境隔离无版本支持,容易引发生产事故
-
无安全审计
-
**配置中心**
-
配置集中、外部化、动态化实时生效
-
多环境隔离多版本支持,较安全
-
配置权限控制、操作变更审计
## 配置中心实战
下面介绍一个使用配置中心的例子。其它基于本地配置的范例都可以参考这个例子改为基于配置中心的动态配置。
...
...
@@ -103,13 +106,16 @@ nacos.config.type=properties
nacos
.
config
.
data
-
id
=
$
{
spring
.
application
.
name
}
```
#### 关键配置项说明
配置项 | 配置说明
--- | ---
nacos.config.auto-refresh | 配置中心的配置变更后自动刷新到配置客户端
nacos.config.namespace | 命名空间(注意是对应命名空间的 ID 值),建议使用命名空间来区分部署环境
nacos.config.server-addr | 配置中心通信地址
nacos.config.type | 配置中心使用的配置格式( properties、yaml 等)
nacos.config.data-id | 配置中心某配置集的唯一标识
-
nacos.config.auto-refresh
配置中心的配置变更后自动刷新到配置客户端
-
nacos.config.namespace
命名空间(注意是对应命名空间的 ID 值),建议使用命名空间来区分部署环境
-
nacos.config.server-addr
配置中心通信地址
-
nacos.config.type
配置中心使用的配置格式( properties、yaml 等)
-
nacos.config.data-id
配置中心某配置集的唯一标识
### 配置中心配置
在进行完上述本地配置后,我们的应用就能和配置中心进行数据同步了。现在根据本地配置信息在配置中心创建相对应的命名空间和同名 data-id 的配置集。
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录