Deploy Apollo and create an application. Then create a namespace, select private to create a private namespace, and choose the json format. Click modify text and fill in the json content. Next, reference the package in the .NET program <PackageReference Inc…

2023年9月11日 0条评论 1074点热度 0人点赞 痴者工良 阅读全文

部署 Apollo 之后,创建一个应用。 然后创建命名空间,选择 private 创建私有命名空间,选择 json 格式。 点击修改文本,填入 json 内容。 然后在 .NET 程序中引入包 <PackageReference Include="Com.Ctrip.Framework.Apollo.Configuration" Version="2.10.2" /> 在配置文件中定义 apollo 的设置。 { "apollo": { "AppId": "ApolloTest", "MetaServe…

2023年9月11日 0条评论 2780点热度 0人点赞 痴者工良 阅读全文

First is the middleware, which determines which groups to display when there is time. All APIs can be obtained from the IApiDescriptionGroupCollectionProvider service, and then identified through APIs to check for groups. if (context.HostingEnvironment.IsDevel…

2023年8月15日 0条评论 1432点热度 2人点赞 痴者工良 阅读全文

首先是中间件,它决定了有时间显示哪些分组。 可以从 IApiDescriptionGroupCollectionProvider 服务中获取所有 API,然后通过 API 进行识别,检查是否有分组。 if (context.HostingEnvironment.IsDevelopment()) { app.UseSwagger(); var descriptionProvider = app.ApplicationServices.GetRe[......]继续阅读

2023年8月15日 0条评论 3736点热度 2人点赞 痴者工良 阅读全文

In SignalR, to obtain the client's connection information, you can use IHttpConnectionFeature to retrieve the client's communication IP and port. // Get the service var feature = Context.Features.Get<IHttpConnectionFeature>(); var httpContext = Context.G…

2023年8月4日 0条评论 1120点热度 0人点赞 痴者工良 阅读全文

在 signalR 中如需获取客户端的连接信息,可以使用 IHttpConnectionFeature 获取客户端通讯的 IP 和端口。 // 获取服务 var feature = Context.Features.Get<IHttpConnectionFeature>(); var httpContext = Context.GetHttpContext(); ArgumentNullException.ThrowIfNull(feature); Argume[......]继续阅读

2023年8月4日 0条评论 3809点热度 0人点赞 痴者工良 阅读全文

In ABP, by default, only local JSON language handling is available. However, for business purposes, we may have many customization needs. This article introduces how to implement multi-language handling based on Redis, fetching language information from Redis.…

2023年7月27日 0条评论 1524点热度 1人点赞 痴者工良 阅读全文

在 ABP 中,默认只有本地 JSON 语言处理,但是在业务上我们可能有好多定制需求。本文介绍如何自己根据 redis 实现一个多语言处理,通过 redis 取得语言信息。 ABP 官方文档:https://docs.abp.io/en/abp/latest/Localization ABP 是这样配置多语言的: services.Configure<AbpLocalizationOptions>(options => { options.Resources .Add<TestResourc…

2023年7月27日 0条评论 4282点热度 1人点赞 痴者工良 阅读全文

Using Chinese characters in .csproj can cause errors during Jenkins CICD. Microsoft.WinFX.targets(439,8): error : Invalid character in the given encoding. The reason is that the encoding used by MSBuild or dotnet publish is UTF-8. When saving the .csproj file,…

2023年7月24日 0条评论 976点热度 0人点赞 痴者工良 阅读全文

在 .csproj 中使用了中文,导致 Jenkins CICD 的时候报错。 Microsoft.WinFX.targets(439,8): error : Invalid character in the given encoding. 原因在于 MSBuild 或者 dotnet publish 使用的编码集合为 utf8。 保存 .csproj 文件时,要使用 utf-8 bom,里面的字符要使用 utf8。 而 powershell 中默认是 GB2312 编码,所以会导致报错。 另一个问题,由于需求,需…

2023年7月24日 0条评论 3251点热度 0人点赞 痴者工良 阅读全文

PdfSharp is a .NET cross-platform PDF processing framework that uses the MIT open-source license, allowing both personal and commercial use without restrictions on closed-source or open-source projects. PdfSharp is maintained by the community and does not have…

2023年7月20日 0条评论 1262点热度 1人点赞 痴者工良 阅读全文

PdfSharp 是一个 .NET 跨平台的 PDF 处理框架,PdfSharp 使用的是 MIT 开源协议,无论是个人还是商业使用均可,且不限制闭源或开源。PdfSharp 由社区维护,无任何收费购买项目。 笔者看中它: 体积轻小, 操作简单, 跨平台,不会出现 System.Drawing 报错, 完全免费,MIT 开源协议 命名空间: using PdfSharp.Drawing; using PdfSharp.Fonts; using PdfSharp.Pdf; using PdfSharp.Snippet…

2023年7月20日 0条评论 5301点热度 1人点赞 痴者工良 阅读全文

Recently, I used a TinyMapper object mapping framework, and I like its simplicity. TinyMapper documentation link: http://tinymapper.net/ TinyMapper is extremely simple; it consists of just a static class: TinyMapper.Bind&lt;Person, PersonDto&gt;(); var…

2023年7月19日 0条评论 1114点热度 2人点赞 痴者工良 阅读全文

最近使用了一个 TinyMapper 对象映射框架,喜欢它的简单。 TinyMapper 文档地址: http://tinymapper.net/ TinyMapper 极其简单,一个静态类即可: TinyMapper.Bind<Person, PersonDto>(); var person = new Person { Id = Guid.NewGuid(), FirstName = "John", LastName = "Doe" }; var personDto = TinyMapper.Map…

2023年7月19日 0条评论 2924点热度 2人点赞 痴者工良 阅读全文

本教程已加入 Istio 系列: https://istio.whuanle.cn 7. Authentication 本章的内容主要是讲解服务间通讯的安全和集群外部访问内部服务的 jwt token 验证。 Istio 提供两种类型的认证,一种是服务间认证 Peer Authentication,一种是客户端请求认证 Request Authentication。 Peer Authentication Peer authentication 用于服务到服务的认证,在零信任网络中,Envoy 给服务之间的通讯加密…

2023年7月9日 0条评论 1288点热度 0人点赞 痴者工良 阅读全文

本教程已加入 Istio 系列:https://istio.whuanle.cn 7,认证 本章的内容主要是讲解服务间通讯的安全和集群外部访问内部服务的 jwt token 验证。 Istio 提供两种类型的认证,一种是服务间认证 Peer Authentication,一种是客户端请求认证 Request Authentication。 Peer Authentication Peer authentication 用于服务到服务的认证,在零信任网络中,Envoy 给服务之间的通讯加密,只有服务双方才能看到请求内…

2023年7月9日 0条评论 3476点热度 0人点赞 痴者工良 阅读全文

本教程已加入 Istio 系列:https://istio.whuanle.cn Observability Istio integrates link tracing applications such as Jaeger, Zipkin, and Skywalking, effectively capturing the structure of the service mesh, displaying the network topology, and analyzing the health of the …

2023年7月9日 0条评论 1379点热度 1人点赞 痴者工良 阅读全文

本教程已加入 Istio 系列:https://istio.whuanle.cn 可观测性 Istio 集成了 Jaeger、Zipkin 和 Skywalking 等链路追踪应用,能够有效地捕获服务网格的结构,展示网络拓扑结构,并分析网格的健康状况。 这一切都得益于 Envoy 代理的实现。由于所有进出流量都需要经过 Envoy 代理,Envoy 可以捕获这些流量记录,并将其推送到相应的链路追踪系统中。这样一来,可以链路追踪系统轻松地监控和分析服务网格内的流量情况。 另外 Istio 还支持 Prometheus…

2023年7月9日 0条评论 4049点热度 1人点赞 痴者工良 阅读全文

此教程已加入 Istio 系列:https://istio.whuanle.cn 5. Egress and Ingress Gateways Istio can manage ingress and egress traffic in a cluster. When clients access applications within the cluster, Istio can implement load balancing, circuit breaking, and other features for …

2023年7月9日 0条评论 1233点热度 0人点赞 痴者工良 阅读全文

本教程已加入 Istio 系列:https://istio.whuanle.cn 5,出入口网关 Istio 可以管理集群的出入口流量,当客户端访问集群内的应用时, Istio 可以将经过 istio-ingressgateway 的流量实现负载均衡和熔断等一系列功能。 可是,如果集群内的一个应用要访问 google.com ,那么我们可以给内部所有请求了 google.com 的流量设置负载均衡吗?答案是可以,Istio 提供了 istio-egressgateway 实现这种功能。因为 Pod 中的容器要访问网…

2023年7月9日 0条评论 2918点热度 0人点赞 痴者工良 阅读全文
167891054