Yyt.Abp.Euraka
1.0.2
dotnet add package Yyt.Abp.Euraka --version 1.0.2
NuGet\Install-Package Yyt.Abp.Euraka -Version 1.0.2
<PackageReference Include="Yyt.Abp.Euraka" Version="1.0.2" />
<PackageVersion Include="Yyt.Abp.Euraka" Version="1.0.2" />
<PackageReference Include="Yyt.Abp.Euraka" />
paket add Yyt.Abp.Euraka --version 1.0.2
#r "nuget: Yyt.Abp.Euraka, 1.0.2"
#:package Yyt.Abp.Euraka@1.0.2
#addin nuget:?package=Yyt.Abp.Euraka&version=1.0.2
#tool nuget:?package=Yyt.Abp.Euraka&version=1.0.2
Yyt.Abp.Euraka
English Version
Overview
Yyt.Abp.Euraka is a library that simplifies Eureka configuration and integration for .NET applications, Version 1.0.2 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.Euraka?
- Minimal Dependencies: Lightweight design with minimal external dependencies, keeps your project lean.
- Secure by Design: Security is prioritized from the design phase to reduce potential vulnerabilities.
- Highly Extensible: Supports easy customization to meet your advanced integration requirements.
- Battle-Tested: Proven stable through long-term validation in multiple production projects.
Core Features
1. Standardized Eureka Configuration
Provides simplified, out-of-the-box configuration for standard Eureka cluster registration and connection, eliminating complex native configurations.
2. Customizable Service Discovery
Supports configuring dedicated service discovery handlers that can be configured for each microservice.
3. Flexible Request Customization
When making requests via Feign, supports custom configuration where each request parameter can be customized for each request.
Code Integration Example
namespace Demo.HttpApi.Host
{
[DependsOn(
typeof(VoloEurakaModule)
)]
public class DemoHttpApiHostModule : AbpModule
{
// config service & other
}
}
### Configuration Example
**appsettings.json**:
```json
{
"MicrServiceHandles": [
{
"HandleName": "GetWayHandle",
"MicrServiceName": "GATEWAY"
}
],
"eureka": {
"client": {
"serviceUrl": "http://xxx:xxx/eureka/",
"validateCertificates": false,
"shouldRegisterWithEureka": true,
"shouldFetchRegistry": true,
"registrationRetryCount": 10,
"registrationRetryIntervalSeconds": 10
},
"instance": {
"port": xxx,
"preferIpAddress": true,
"instanceId": "web-test",
"hostname": "xxx.xxx.xxx.xxx",
"ipAddress": "xxx.xxx.xxx.xxx"
}
}
}
Code Invocation Example
POST Request Example
**Note:** This library requires the
Yyt.Abp.HttpClientpackage. Please ensure it is installed in your project before using the service.Install-Package Yyt.Abp.HttpClient
public class DemoService:IDemoService
{
private readonly IHttpClientService _httpClientService;
public DemoService(IHttpClientService httpClientService)
{
_httpClientService=httpClientService;
}
public async Task<ServiceResult<string>> AddAsync(AddInput input)
{
Dictionary<string, string> dic = new Dictionary<string, string>
{
{ "Authorization", "***" }
};
var postResult = await _httpClientService.PostMicrServiceAsync(new PostMicrServiceInput()
{
HandlerName = "GetWayHandle",
Url = url,
DicHeaders = dic,
Data = requestStr,
});
}
}
Chinese Version
概述
Yyt.Abp.Euraka 提供了简化 .Net 程序集成 Euraka 的配置功能,Version 1.0.2 增加了对net8的支持。代码采用了 Module 模块化设计,能无缝集成到项目中。该库由 Patrick.Z 提供支持,简化了 .Net 应用程序中的日常开发配置工作,为您分担繁重的工作。
为什么选择 Yyt.Abp.Euraka?
- 极少依赖:轻量级设计,外部依赖少,保持项目精简
- 设计安全:从设计阶段就优先考虑安全性,减少潜在漏洞
- 可扩展定制:支持轻松定制以满足高级集成需求
- 久经沙场:经过多个生产项目的长期验证,稳定性可靠
核心功能
1. 标准化 Eureka 配置
提供简化的开箱即用配置,用于标准 Eureka 集群注册和连接,消除复杂的原生配置。
2. 可定制的服务发现
支持为每个微服务配置专用的服务发现 Handles。
3. 灵活的请求定制
使用 Feign 方式请求时,可定制化每个请求参数。
代码模块集成示例
namespace Demo.HttpApi.Host
{
[DependsOn(
typeof(VoloEurakaModule)
)]
public class DemoHttpApiHostModule : AbpModule
{
// config service & other
}
}
配置示例
appsettings.json:
{
"MicrServiceHandles": [
{
"HandleName": "GetWayHandle",
"MicrServiceName": "GATEWAY"
}
],
"eureka": {
"client": {
"serviceUrl": "http://xxx:xxx/eureka/",
"validateCertificates": false,
"shouldRegisterWithEureka": true,
"shouldFetchRegistry": true,
"registrationRetryCount": 10,
"registrationRetryIntervalSeconds": 10
},
"instance": {
"port": xxx,
"preferIpAddress": true,
"instanceId": "web-test",
"hostname": "xxx.xxx.xxx.xxx",
"ipAddress": "xxx.xxx.xxx.xxx"
}
}
}
代码调用示例
POST 请求示例
**注意:** 本库依赖
Yyt.Abp.HttpClient包. 请在使用该服务前,确保已在项目中安装此包.Install-Package Yyt.Abp.HttpClient
public class DemoService:IDemoService
{
private readonly IHttpClientService _httpClientService;
public DemoService(IHttpClientService httpClientService)
{
_httpClientService=httpClientService;
}
public async Task<ServiceResult<string>> AddAsync(AddInput input)
{
Dictionary<string, string> dic = new Dictionary<string, string>
{
{ "Authorization", "***" }
};
var postResult = await _httpClientService.PostMicrServiceAsync(new PostMicrServiceInput()
{
HandlerName = "GetWayHandle",
Url = url,
DicHeaders = dic,
Data = requestStr,
});
}
}
Document Version: v1.0
Created Date: June 2026
Author: Patrick.Z
| Product | Versions 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. |
-
net6.0
- Steeltoe.Discovery.ClientCore (>= 3.2.3)
- Steeltoe.Discovery.Eureka (>= 3.2.3)
- Volo.Abp.AspNetCore (>= 6.0.2)
-
net8.0
- Steeltoe.Discovery.ClientCore (>= 3.2.3)
- Steeltoe.Discovery.Eureka (>= 3.2.3)
- Volo.Abp.AspNetCore (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.