提交 25e6e52a 编写于 作者: X xiongchun

修正MP日志自定义问题

上级 baae5845
......@@ -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>
......
......@@ -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;
......
......@@ -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
......
......@@ -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-shenyu-service</artifactId>
<packaging>jar</packaging>
<version>1.0.0</version>
......
......@@ -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>
......
......@@ -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
......
......@@ -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
......
### 介绍
### 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
......@@ -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.
先完成此消息的编辑!
想要评论请 注册