diff --git a/pangu-examples/pangu-examples-crud/pom.xml b/pangu-examples/pangu-examples-crud/pom.xml index 8654dc03689416fc70e5edc9f30bd329ea3687fc..1ad2226dca072dc31ed3385e8dd9bd74bb5a0b9a 100644 --- a/pangu-examples/pangu-examples-crud/pom.xml +++ b/pangu-examples/pangu-examples-crud/pom.xml @@ -7,7 +7,7 @@ com.gitee.pulanos.pangu pangu-parent - 5.0.8 + 5.1.0 diff --git a/pangu-examples/pangu-examples-crud/src/main/java/com/gitee/pulanos/pangu/showcases/crud/service/CrudService.java b/pangu-examples/pangu-examples-crud/src/main/java/com/gitee/pulanos/pangu/showcases/crud/service/CrudService.java index 397176bc7c6f732b936a2c4e3a75c2a1418cce76..9711b6a6d0fd86c525eb397b624beb567108eebb 100644 --- a/pangu-examples/pangu-examples-crud/src/main/java/com/gitee/pulanos/pangu/showcases/crud/service/CrudService.java +++ b/pangu-examples/pangu-examples-crud/src/main/java/com/gitee/pulanos/pangu/showcases/crud/service/CrudService.java @@ -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; diff --git a/pangu-examples/pangu-examples-crud/src/main/resources/application-dev.properties b/pangu-examples/pangu-examples-crud/src/main/resources/application-dev.properties index f11d28400e8593052f02732056b85f29fba81d41..dda55fe358b40a93d02ffccf95949e710438d00a 100644 --- a/pangu-examples/pangu-examples-crud/src/main/resources/application-dev.properties +++ b/pangu-examples/pangu-examples-crud/src/main/resources/application-dev.properties @@ -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.stdout.StdOutImpl +mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.slf4j.Slf4jImpl pangu.jdbc.db-type=mysql logging.level.root=INFO diff --git a/pangu-examples/pangu-examples-dubbo-gateway-shenyu-service/pom.xml b/pangu-examples/pangu-examples-dubbo-gateway-shenyu-service/pom.xml index aaa61f548b912d3343a1ea7cd611f34f738c43d2..45c59481351cc3831e240124004d2657cb2d0aaf 100644 --- a/pangu-examples/pangu-examples-dubbo-gateway-shenyu-service/pom.xml +++ b/pangu-examples/pangu-examples-dubbo-gateway-shenyu-service/pom.xml @@ -7,12 +7,12 @@ com.gitee.pulanos.pangu pangu-parent - 5.0.7 + 5.0.8 com.gitee.pulanos.pangu - pangu-examples-dubbo-gateway-service + pangu-examples-dubbo-gateway-shenyu-service jar 1.0.0 diff --git a/pangu-examples/pangu-examples-dubbo-service/pom.xml b/pangu-examples/pangu-examples-dubbo-service/pom.xml index e31d340a8a251c6f77cc89759730fbc13f0368b9..600c5e535482c93913dd0fde4689bf33c8d706aa 100644 --- a/pangu-examples/pangu-examples-dubbo-service/pom.xml +++ b/pangu-examples/pangu-examples-dubbo-service/pom.xml @@ -30,6 +30,10 @@ pangu-examples-dubbo-api 1.0.0 + + org.projectlombok + lombok + diff --git a/pangu-examples/pangu-examples-shardingsphere-sharding/src/main/resources/application-sharding-tables.properties b/pangu-examples/pangu-examples-shardingsphere-sharding/src/main/resources/application-sharding-tables.properties index 33482109258e380764dcd202e226d4fec3d8667f..84cab0d4927811affdf6a868a0e4ad35f6a19763 100644 --- a/pangu-examples/pangu-examples-shardingsphere-sharding/src/main/resources/application-sharding-tables.properties +++ b/pangu-examples/pangu-examples-shardingsphere-sharding/src/main/resources/application-sharding-tables.properties @@ -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.stdout.StdOutImpl +mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.slf4j.Slf4jImpl spring.shardingsphere.mode.type=Memory # print shardingsphere Actual SQL log diff --git a/pangu-examples/pangu-examples-webapi-local-service-based/src/main/resources/application-dev.properties b/pangu-examples/pangu-examples-webapi-local-service-based/src/main/resources/application-dev.properties index 28e72cac0a96143af0474e16c6849a706b061c42..51c3347996730fae029653874893a17bf89af667 100644 --- a/pangu-examples/pangu-examples-webapi-local-service-based/src/main/resources/application-dev.properties +++ b/pangu-examples/pangu-examples-webapi-local-service-based/src/main/resources/application-dev.properties @@ -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.stdout.StdOutImpl +mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.slf4j.Slf4jImpl # \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 diff --git a/pangu-website/README.md b/pangu-website/README.md index e7fdc45e7c2ee3396e8ee1096a4bc56c9d3c6a9a..34d69e00e4c0861d90d16bb50dadfc876305d7fa 100644 --- a/pangu-website/README.md +++ b/pangu-website/README.md @@ -1,9 +1,23 @@ -### 介绍 +### 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 diff --git "a/pangu-website/docs/advanced-guide/\351\205\215\347\275\256\344\270\255\345\277\203.md" "b/pangu-website/docs/advanced-guide/\351\205\215\347\275\256\344\270\255\345\277\203.md" index 78295f8d9d8e5ae407f79fefcf0f3fcc852a7c04..ed9558812fa56561c6c17085f4cff3414a213e42 100644 --- "a/pangu-website/docs/advanced-guide/\351\205\215\347\275\256\344\270\255\345\277\203.md" +++ "b/pangu-website/docs/advanced-guide/\351\205\215\347\275\256\344\270\255\345\277\203.md" @@ -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 的配置集。