Yyt.Abp.Nacos 1.0.1

dotnet add package Yyt.Abp.Nacos --version 1.0.1
                    
NuGet\Install-Package Yyt.Abp.Nacos -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Yyt.Abp.Nacos" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Yyt.Abp.Nacos" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Yyt.Abp.Nacos" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Yyt.Abp.Nacos --version 1.0.1
                    
#r "nuget: Yyt.Abp.Nacos, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Yyt.Abp.Nacos@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Yyt.Abp.Nacos&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Yyt.Abp.Nacos&version=1.0.1
                    
Install as a Cake Tool

Yyt.Abp.Nacos


English Version

Overview

Yyt.Abp.Nacos is a library that simplifies Nacos configuration and integration for .NET applications,Version 1.0.1 added support for net8. Built with a modular architecture, it enables seamless integration into your existing projects. Supported by Patrick.Z, this library streamlines repetitive daily development configurations in .NET applications and takes the heavy lifting off your shoulders.

Why Choose Yyt.Abp.Nacos?

  • Minimal Dependencies: Lightweight design with minimal external dependencies, keeps your project lean and efficient.
  • Secure by Design: Security is prioritized from the design phase to reduce potential vulnerabilities.
  • Highly Extensible: Easy to extend and customize to meet your advanced microservice requirements.
  • Battle-Tested: Proven stable and reliable through validation in multiple production projects.

Core Features

1. Standardized Nacos Configuration

Supports quick configuration of standard Nacos connection and registration information.

2. Custom Service Discovery Handlers

Allows configuring dedicated service discovery handlers for each individual microservice.

3. Feign Request Parameter Customization

Enables customized configuration for each request parameter when using Feign-based service calls.

4. Nacos Service URL Replacement Dictionary

Supports configurable dictionary for consistent URL replacement of Nacos microservice addresses.

5. Microservice Group Configuration

Supports custom configuration of microservice group names.

Code Integration Example

namespace Demo.HttpApi.Host
{
    [DependsOn(
      typeof(AbpNacosModule)
    )]
    public class DemoHttpApiHostModule : AbpModule
    {
        // config service & other
    }
}

Configuration Example

appsettings.json:

{
  "NacosMicrServiceHostDic": {
    "demoservice": "demoService"
  },
  "NacosMicrServiceGroupName": "",
  "NacosMicrServiceHandles": [
    {
      "HandleName": "GetWayHandle",
      "MicrServiceName": "DEMO-GATEWAY"
    }
  ],
  "nacos": {
    "Listeners": [
      {
        "Optional": false,
        "DataId": "demo-appsettings.json",
        "Group": "DEMO_GROUP"
      }
    ],
    "ServerAddresses": [ "*.*.*.*:8848" ],
    "DefaultTimeOut": 15000,
    "Namespace": "***-***-***-***-***",
    "ListenInterval": 1000,
    "ServiceName": "demoService",
    "EndPoint": "",
    "GroupName": "DEMO_GROUP", 
    "ClusterName": "DEFAULT",
    "Ip": "*.*.*.*",
    "PreferredNetworks": "",
    "Port": **, 
    "Weight": 100,
    "RegisterEnabled": true,
    "InstanceEnabled": true,
    "Ephemeral": true,
    "Secure": false,
    "AccessKey": "",
    "SecretKey": "",
    "UserName": "***",
    "Password": "***",
    "ConfigUseRpc": true,
    "NamingUseRpc": true,
    "NamingLoadCacheAtStart": ""
  }
}

Chinese Version

概述

Yyt.Abp.Nacos 提供了简化 .Net 程序集成 Nacos 的配置功能,Version 1.0.1 增加了对net8的支持。代码采用了 Module 模块化设计,能无缝集成到项目中。该库由 Patrick.Z 提供支持,简化了 .Net 应用程序中的日常开发配置工作,为您分担繁重的工作。

为什么选择 Yyt.Abp.Nacos?

  • 极少依赖:轻量级设计,外部依赖少,保持项目精简高效
  • 设计安全:从设计阶段就优先考虑安全性,减少潜在漏洞
  • 可扩展定制:易于扩展和定制,满足高级微服务需求
  • 久经沙场:经过多个生产项目验证,稳定可靠

核心功能

1. 标准化 Nacos 配置

支持快速配置标准 Nacos 连接和注册信息。

2. 自定义服务发现 Handles

允许为每个微服务配置专用的服务发现 Handles。

3. Feign 请求参数定制

使用 Feign 方式请求时可定制化每个请求参数。

4. Nacos 服务 URL 替换字典

支持配置 Nacos 微服务地址的一致性替换字典。

5. 微服务分组配置

支持自定义配置微服务分组名称。

代码模块集成示例

namespace Demo.HttpApi.Host
{
    [DependsOn(
      typeof(AbpNacosModule)
    )]
    public class DemoHttpApiHostModule : AbpModule
    {
        // config service & other
    }
}

配置示例

appsettings.json:

{
  "NacosMicrServiceHostDic": {
    "demoservice": "demoService"
  },
  "NacosMicrServiceGroupName": "",
  "NacosMicrServiceHandles": [
    {
      "HandleName": "GetWayHandle",
      "MicrServiceName": "DEMO-GATEWAY"
    }
  ],
  "nacos": {
    "Listeners": [
      {
        "Optional": false,
        "DataId": "demo-appsettings.json",
        "Group": "DEMO_GROUP"
      }
    ],
    "ServerAddresses": [ "*.*.*.*:8848" ],
    "DefaultTimeOut": 15000,
    "Namespace": "***-***-***-***-***",
    "ListenInterval": 1000,
    "ServiceName": "demoService",
    "EndPoint": "",
    "GroupName": "DEMO_GROUP", 
    "ClusterName": "DEFAULT",
    "Ip": "*.*.*.*",
    "PreferredNetworks": "",
    "Port": **, 
    "Weight": 100,
    "RegisterEnabled": true,
    "InstanceEnabled": true,
    "Ephemeral": true,
    "Secure": false,
    "AccessKey": "",
    "SecretKey": "",
    "UserName": "***",
    "Password": "***",
    "ConfigUseRpc": true,
    "NamingUseRpc": true,
    "NamingLoadCacheAtStart": ""
  }
}

Document Version: v1.0
Created Date: June 2026
Author: Patrick.Z

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 106 8/29/2026
1.0.0 124 6/11/2026