包含DM数据库适配
Go to file
xzxiaoshan 41f03fea0f
[ISSUE#9730] 对多数据源插件代码进行调整(向前兼容) (#9784)
* Upgrade to 2.2.1-RC (#9741)

* 补充处理所有 tenantId

* 补充处理 tenantId

* 处理tenantid,内部类引用的变量不能被修改,换个变量名

* 新增支持:nacos 默认的 tenant/namespaceId 为空字符串,自 nacos 2.2.0 版本起开始支持多数据源插件,为空的 ID 会在 oracle 数据库适配中出现问题 ( where tenantid = '' ),本次修改对以往程序不产生影响。

* 固定填充的ID为public,完全自定义没有太大意义,目的是在保证默认id不为空,可选填充,不配置默认照旧

* fix bug

* 将通用的SQL提取到Mapper接口中,这样能很大的降低不同数据库需要重写的SQL的量,同时避免了大量的重复代码问题。

* 将原来sql中固定写死的 tenant_id = ''  修改为 tenant_id =  NamespaceUtil.getNamespaceDefaultId() 。暂时没深究为什么不用问号动参而是固定写死。

* 方法提取到 mapper 接口中,顺便解决了多余 paramList 定义的(虽然这个方法好像已经弃用)

* 方法迁移到接口默认实现中

* 恢复 publci id 默认值为空值 "",等以后决策好使用默认值为 "public" 时,再设置 NAMESPACE_PUBLIC_ID_DEFAULT="public" 即可。

* 回滚 Controller 层对 tenant_id 的处理,另起PR讨论和修改。

* code style

* 变量名称和注释未通过 checkStyle 检查,按规范调整。

* nacos check style 修改,无代码变动

* fix code

* fix checkstyle

* fix checkstyle 去除多余的 return

* fix pmd

* fix test unit bug

* 因为将sql提取到 mapper 接口中,一些不影响sql语句运行的sql,有空格等差异,出现了test用例差异问题,逐个处理。比如(where a =? 和 where a= ?)

Co-authored-by: 杨翊 SionYang <xiweng.yy@alibaba-inc.com>
2023-01-16 16:14:29 +08:00
.github ci: Replace deprecated set-state set-output GitHub Action's commands (#9636) 2022-11-30 09:27:20 +08:00
address fix:replace nacos website url to https. (#9797) 2023-01-10 09:47:52 +08:00
api fix:replace nacos website url to https. (#9797) 2023-01-10 09:47:52 +08:00
auth fix:replace nacos website url to https. (#9797) 2023-01-10 09:47:52 +08:00
client fix:replace nacos website url to https. (#9797) 2023-01-10 09:47:52 +08:00
cmdb fix:replace nacos website url to https. (#9797) 2023-01-10 09:47:52 +08:00
common [ISSUE#9730] 对多数据源插件代码进行调整(向前兼容) (#9784) 2023-01-16 16:14:29 +08:00
config [ISSUE #9783] 处理namespaceId=public 时 v2接口 无法创建与删除配置 (#9809) 2023-01-16 10:01:54 +08:00
consistency fix:replace nacos website url to https. (#9797) 2023-01-10 09:47:52 +08:00
console [ISSUE#9730] 对多数据源插件代码进行调整(向前兼容) (#9784) 2023-01-16 16:14:29 +08:00
console-ui fix issue #9795 (#9844) 2023-01-13 10:33:46 +08:00
core Modify the return value comment of the isBasicInfoChanged method (#9849) 2023-01-16 14:02:50 +08:00
distribution Provide more configuration items to allow users to customize their grpc services to better optimize network performance. (#9806) 2023-01-11 09:47:15 +08:00
doc nacos is coming 2018-07-21 00:27:23 +08:00
example fix:replace nacos website url to https. (#9797) 2023-01-10 09:47:52 +08:00
istio fix:replace nacos website url to https. (#9797) 2023-01-10 09:47:52 +08:00
naming fix:replace nacos website url to https. (#9797) 2023-01-10 09:47:52 +08:00
plugin [ISSUE#9730] 对多数据源插件代码进行调整(向前兼容) (#9784) 2023-01-16 16:14:29 +08:00
plugin-default-impl fix:replace nacos website url to https. (#9797) 2023-01-10 09:47:52 +08:00
prometheus fix:replace nacos website url to https. (#9797) 2023-01-10 09:47:52 +08:00
resources fix copyright. (#6389) 2021-07-20 09:47:08 +08:00
style [ISSUE #6970] Add rest api v2 in core module (#7085) 2021-11-10 14:11:40 +08:00
sys fix:replace nacos website url to https. (#9797) 2023-01-10 09:47:52 +08:00
test [ISSUE #9783] 处理namespaceId=public 时 v2接口 无法创建与删除配置 (#9809) 2023-01-16 10:01:54 +08:00
.gitattributes Fix #339 Project language problem identified in github 2019-01-22 10:02:01 +08:00
.gitignore [ISSUE #7600] ignore log files at gitignore (#7601) 2022-01-12 11:45:36 +08:00
.travis.yml Build and test on Linux ARM64 at TravisCI (#7777) 2022-02-21 17:10:00 +08:00
BUILDING #1105 Add integration tests 2020-01-09 19:13:37 +08:00
CHANGELOG.md Fix a spelling mistake (#9258) 2022-10-10 09:45:40 +08:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2018-11-07 22:50:14 +08:00
codecov.yml Add codeCov report after CI finish (#8344) 2022-05-11 16:20:28 +08:00
CONTRIBUTING.md [Document] Fix some translation issues (#8507) 2022-06-07 15:35:53 +08:00
LICENSE fix LICENSE by https://www.apache.org/licenses/LICENSE-2.0.txt (#6277) 2021-07-07 10:00:29 +08:00
NOTICE update notice (#7939) 2022-03-15 13:34:41 +08:00
pom.xml [ISSUE#9730] 对多数据源插件代码进行调整(向前兼容) (#9784) 2023-01-16 16:14:29 +08:00
README.md update readme for Contact Ding Group (#9739) 2022-12-21 18:49:36 +08:00
REPORTING-BUGS.md [Document] Fix some translation issues (#8507) 2022-06-07 15:35:53 +08:00

Nacos: Dynamic Naming and Configuration Service

Gitter License Gitter


What does it do

Nacos (official site: nacos.io) is an easy-to-use platform designed for dynamic service discovery and configuration and service management. It helps you to build cloud native applications and microservices platform easily.

Service is a first-class citizen in Nacos. Nacos supports almost all type of servicesfor exampleDubbo/gRPC service, Spring Cloud RESTFul service or Kubernetes service.

Nacos provides four major functions.

  • Service Discovery and Service Health Check

    Nacos makes it simple for services to register themselves and to discover other services via a DNS or HTTP interface. Nacos also provides real-time health checks of services to prevent sending requests to unhealthy hosts or service instances.

  • Dynamic Configuration Management

    Dynamic Configuration Service allows you to manage configurations of all services in a centralized and dynamic manner across all environments. Nacos eliminates the need to redeploy applications and services when configurations are updated, which makes configuration changes more efficient and agile.

  • Dynamic DNS Service

    Nacos supports weighted routing, making it easier for you to implement mid-tier load balancing, flexible routing policies, flow control, and simple DNS resolution services in the production environment within your data center. It helps you to implement DNS-based service discovery easily and prevent applications from coupling to vendor-specific service discovery APIs.

  • Service and MetaData Management

    Nacos provides an easy-to-use service dashboard to help you manage your services metadata, configuration, kubernetes DNS, service health and metrics statistics.

Quick Start

It is super easy to get started with your first project.

Deploying Nacos on cloud

You can deploy Nacos on cloud, which is the easiest and most convenient way to start Nacos.

Use the following Nacos deployment guide to see more information and deploy a stable and out-of-the-box Nacos server.

Start by the provided startup package

Step 1: Download the binary package

You can download the package from the latest stable release.

Take release nacos-server-1.0.0.zip for example:

unzip nacos-server-1.0.0.zip
cd nacos/bin 

Step 2: Start Server

On the Linux/Unix/Mac platform, run the following command to start server with standalone mode:

sh startup.sh -m standalone

On the Windows platform, run the following command to start server with standalone mode. Alternatively, you can also double-click the startup.cmd to run NacosServer.

startup.cmd -m standalone

For more details, see quick-start.

Quick start for other open-source projects:

Documentation

You can view the full documentation from the Nacos website.

You can also read this online eBook from the NACOS ARCHITECTURE & PRINCIPLES.

All the latest and long-term notice can also be found here from Github notice issue.

Contributing

Contributors are welcomed to join Nacos project. Please check CONTRIBUTING about how to contribute to this project.

How can I contribute?

  • Take a look at issues with tags marked good first issue or contribution welcome.
  • Answer questions on issues.
  • Fix bugs reported on issues, and send us a pull request.
  • Review the existing pull request.
  • Improve the website, typically we need
    • blog post
    • translation on documentation
    • use cases around the integration of Nacos in enterprise systems.
  • nacos-spring-project provides the integration functionality for Spring.
  • nacos-group is the repository that hosts the eco tools for Nacos, such as SDK, synchronization tool, etc.
  • spring-cloud-alibaba provides the one-stop solution for application development over Alibaba middleware which includes Nacos.

Contact

  • Gitter: Nacos's IM tool for community messaging, collaboration and discovery.
  • Twitter: Follow along for latest nacos news on Twitter.
  • Weibo: Follow along for latest nacos news on Weibo (Twitter of China version).
  • Nacos Segmentfault: Get latest notice and prompt help from Segmentfault.
  • Email Group:
    • users-nacos@googlegroups.com: Nacos usage general discussion.
    • dev-nacos@googlegroups.com: Nacos developer discussion (APIs, feature design, etc).
    • commits-nacos@googlegroups.com: Commits notice, very high frequency.
  • Join us from DingDing(Group 1: 21708933(full), Group 2: 30438813(full), Group 3: 31222241(full), Group 4: 12810027056).

Nacos

Enterprise Service

If you need Nacos enterprise service support, or purchase cloud product services, you can join the discussion by scanning the following DingTalk group. It can also be directly activated and used through the microservice engine (MSE) provided by Alibaba Cloud. https://cn.aliyun.com/product/aliware/mse?spm=nacos-website.topbar.0.0.0

image

Download

Who is using

These are only part of the companies using Nacos, for reference only. If you are using Nacos, please add your company here to tell us your scenario to make Nacos better.

Alibaba Group 虎牙直播 ICBC 爱奇艺 平安科技 华夏信财 优客工场 贝壳找房 瑞安农村商业银行 司法大数据 搜易贷 美菜 松格科技 平行云 甘肃紫光 海云天 集萃智能 Acmedcare+ 吾享 北京天合互联信息有限公司 上海密尔克卫化工 大连新唯 立思辰 拓深科技 东家 上海克垚 郑州山水 联采科技 南京28研究所 长亮科技 深圳易停车库 凤凰网-汽车 武汉日创科技 易管智能 云帐房 知氏教育 中化信息 一点车 明传无线 妙优车 蜂巢 华存数据 数云 广通软件 菜菜 科蓝公司 浩鲸 未名天日语 金联创 同窗链 顺能 百世快递 汽车之家 鲸打卡 时代光华 康美 环球易购 Nepxion 东莞最佳拍档 chigua 宅无限 天阙 联合永道 明源云 三诺生物