上一页 1 2 3 4 5 6 ··· 18 下一页

2023年3月29日

Eureka NetCore 服务注册与发现

摘要: 1 创建springboot eureka项目。 <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> <version 阅读全文

posted @ 2023-03-29 16:47 jonney_wang 阅读(137) 评论(0) 推荐(0) 编辑

2023年2月9日

C#枚举

摘要: C#枚举比较死板,没有Java里自由,有些需求要特别对待。 public struct EnumItem { public int Value; public string Desc; public EnumItem(int value, string desc) { Value = value; 阅读全文

posted @ 2023-02-09 15:34 jonney_wang 阅读(24) 评论(0) 推荐(0) 编辑

2022年8月21日

netcore MongoDB

摘要: NuGet MongoDB.Driver using MongoDB.Bson; using MongoDB.Driver; using System; namespace MongoTest { public class MongoHp { static MongoHp() { MongoDB.B 阅读全文

posted @ 2022-08-21 09:02 jonney_wang 阅读(97) 评论(0) 推荐(0) 编辑

2022年8月3日

centos MongoDB

摘要: 从官网下载tgz格式包,解压后创建data目录和logs目录,然后建立mongod.conf 配置和服务单元 mongo.service mongod.conf #数据库数据存放目录 dbpath=/usr/local/mongodb-5.0.10/data #数据库日志存放目录 logpath=/ 阅读全文

posted @ 2022-08-03 18:00 jonney_wang 阅读(48) 评论(0) 推荐(0) 编辑

2022年4月19日

netcore centos unit服务文件

摘要: [Unit] Description=coreApiService [Service] Type=simple WorkingDirectory=/usr/local/app/netcore ExecStart=/usr/bin/dotnet CoreApi.dll #Restart=on-fail 阅读全文

posted @ 2022-04-19 09:16 jonney_wang 阅读(20) 评论(0) 推荐(0) 编辑

2022年4月2日

aspnetcore 认证和授权

摘要: public class EAuthenticationHandler : AuthenticationHandler<AuthenticationSchemeOptions> { private readonly IHttpContextAccessor _httpContextAccessor; 阅读全文

posted @ 2022-04-02 09:08 jonney_wang 阅读(169) 评论(0) 推荐(0) 编辑

2022年3月30日

ExpressionMapper

摘要: /// <summary> /// 利用表达式目录树进行实体映射 /// </summary> /// <typeparam name="TSource"></typeparam> /// <typeparam name="TTarget"></typeparam> public static cl 阅读全文

posted @ 2022-03-30 10:03 jonney_wang 阅读(41) 评论(0) 推荐(1) 编辑

2021年12月12日

aspnetcore 基本功能

摘要: 配置: using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.Extensions.Configurati 阅读全文

posted @ 2021-12-12 19:38 jonney_wang 阅读(71) 评论(0) 推荐(0) 编辑

2020年11月28日

Kestrel gRPC

摘要: gRPC走http2协议,到目前我还没找到如何把gRPC server 部署在iis下。 现在只能走Kestrel。 public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(ar 阅读全文

posted @ 2020-11-28 19:54 jonney_wang 阅读(420) 评论(0) 推荐(0) 编辑

2020年11月25日

aspnetcore datetime json格式化

摘要: public class DateTimeConverter : JsonConverter<DateTime> { public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializer 阅读全文

posted @ 2020-11-25 08:53 jonney_wang 阅读(439) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 ··· 18 下一页

导航