• 首页
  • 产品中心
    • 数式Oinone四大产品

      低代码开发平台无代码开发平台集成开发平台AI大模型开发
    • 数式Oinone体系能力

      用户与组织权限管理文件管理消息中心国际化业务审计
    • 数式Oinone核心产品特性

      低无一体面向软件公司场景无限制应用级扩容可分可合
  • 服务中心
    • 客户服务

      预约演示方案咨询私有部署找人定制
    • 开发者

      问答下载
    • Oinone学院

      社区学习

    《精讲面向软件公司的低代码平台——以Oinone为例》

  • 合作伙伴
    渠道申请伙伴名录专家库
  • 关于数式
0571-88757863

Project Integration:Introducing Nacos as the Registration Center in Oinone Projects


I. Overview

Note:

  • The default Dubbo registration center for Oinone projects is ZK, but in actual projects, Nacos may be required as the registration center.
  • Oinone defaults to introducing nacos-client-1.4.1. This low version does not support authentication configuration; this client version supports both Nacos service 1.x and 2.x versions.

II. Adding Dependencies to the Project

Introduce dependencies in the project's main pom.

<dependency>
    <groupId>org.apache.dubbo</groupId>
    <artifactId>dubbo-registry-nacos</artifactId>
    <version>2.7.22</version>
</dependency>

Introduce dependencies in the pom of the project's boot engineering.

<dependency>
    <groupId>org.apache.dubbo</groupId>
    <artifactId>dubbo-registry-nacos</artifactId>
</dependency>

III. Configuration Modification

Modify Dubbo service registration to Nacos.

Configure in the bootstrap.yml file or modify Dubbo configuration in the application.yml file.

dubbo:
  application:
    name: pamirs-demo
    version: 1.0.0
  registry:
    id: pamirs-demo-registry
    address: nacos://192.168.0.118:8848
    username: nacos # Username for authentication (modify according to the situation), no need to configure username and password if authentication is not enabled
    password: nacos # Password for authentication (modify according to the situation), no need to configure username and password if authentication is not enabled
    # Configuration to close writing Dubbo configuration to the configuration center when using Nacos registration center
    use-as-metadata-center: false
    use-as-config-center: false
  config-center:
    address: nacos://192.168.0.118:8848
    username: nacos # Username for authentication (modify according to the situation), no need to configure username and password if authentication is not enabled
    password: nacos # Password for authentication (modify according to the situation), no need to configure username and password if authentication is not enabled
  metadata-report:
    failfast: false # Turn off the error reporting function
    address: nacos://192.168.0.118:8848
    username: nacos # Username for authentication (modify according to the situation), no need to configure username and password if authentication is not enabled
    password: nacos # Password for authentication (modify according to the situation), no need to configure username and password if authentication is not enabled
  protocol:
    name: dubbo
    port: -1
    serialization: pamirs
  scan:
    base-packages: pro.shushi
  cloud:
    subscribed-services:

IV. Notes on Building Distributed Projects with Oinone

(Ⅰ) Service Publication Scope of Oinone Remote Services

Generalized service scope, optional values: module, namespace module: Publish remote services by module dimension namespace: Publish remote services by Fun's namespace dimension By default, services are published by module dimension.

pamirs:
  distribution:
    service:
     #serviceScope: optional values namespace, module
     serviceScope: module

(Ⅱ) Turning Off Dubbo Service Registration Metadata Reporting Logs

logging:
 level:
   root: info
   pro.shushi.pamirs.framework.connectors.data.mapper.PamirsMapper: error
   pro.shushi.pamirs.framework.connectors.data.mapper.GenericMapper: error # mybatis sql logs
   RocketmqClient: error
   org.apache.dubbo.registry.zookeeper.ZookeeperRegistry: error
   org.apache.dubbo.registry.integration.RegistryDirectory: error
   org.apache.dubbo.config.ServiceConfig: error
   com.alibaba.nacos.client.naming: error
   org.apache.dubbo.registry.nacos.NacosRegistry: error
   org.apache.dubbo.registry.support.AbstractRegistryFactory: error
   org.apache.dubbo.registry.integration.RegistryProtocol: error
   org.apache.dubbo.registry.client.metadata.store.RemoteMetadataServiceImpl: off
   org.apache.dubbo.metadata.store.zookeeper.ZookeeperMetadataReport: off
   org.apache.dubbo.metadata.store.nacos.NacosMetadataReport: off

(Ⅲ) Redundant Configurations Appearing in the Nacos Configuration List

When Dubbo integrates with the Nacos registration center, redundant configurations will appear. For detailed references: Many irrelevant configurations will be automatically created in the configuration list: https://github.com/apache/dubbo/issues/6645 Redundant configurations appear in the configuration list: https://github.com/alibaba/nacos/issues/8843

They can be turned off according to the following configuration.

Note:

It is mainly these three configurations (use-as-config-center, use-as-metadata-center, metadata-report.failfast), and the generated configurations need to be manually deleted.

dubbo:
 application:
   name: pamirs-demo
   version: 1.0.0
   metadata-type: local
 registry:
   id: pamirs-demo-registry
   address: nacos://192.168.0.129:8848
   username: nacos
   password: nacos
   # Configuration to close writing Dubbo configuration to the configuration center when using Nacos registration center
   use-as-metadata-center: false
   use-as-config-center: false
 config-center:
   address: nacos://192.168.0.129:8848
   username: nacos
   password: nacos
 metadata-report:
   failfast: false # Turn off the error reporting function
   address: nacos://192.168.0.129:8848
   username: nacos
   password: nacos
 protocol:
   name: dubbo
   port: -1
   serialization: pamirs
 scan:
   base-packages: pro.shushi
 cloud:
   subscribed-services:

Note: For more YAML configurations, please go to Module API for consultation.

Edit this page
Last Updated:1/15/26, 4:02 AM
Prev
Project Integration:How Oinone Supports Building Distributed Projects
Next
Project Deployment:Common Issues in Docker Deployment
默认页脚
Copyright © 2026 Mr.Hope