随笔分类 - 其它/测试等
摘要:1:问题:git clone下载不了,提示没有权限或者说仓库找不到等问题 2:分析:权限明明是OK的,ssh 重新删除设置问题仍旧 3:清除本地的git账户相关信息,重新输入用户名密码 git config --system --unset credential.helper 5:再次拉取仓库时会要
阅读全文
摘要:问题点:1:我们在Swagger授权时往往要输入前缀,感觉比较麻烦 2:Token过期,前端页面没有跳转只是抛一个异常,需要刷新一下再登录才行,体验差 private const string MyAllowSpecificOrigins = "_myAllowSpecificOrigins"; p
阅读全文
摘要:目前都比较流行使用 Serilog, 官网url: https://serilog.net/ 1:Nuget包 公司一***项目中新增如下Nuget依赖 <PackageReference Include="Serilog.Extensions.Hosting" Version="3.1.0" />
阅读全文
摘要:1:一个静态帮助类 using Quartz; using Quartz.Impl; using Quartz.Core; using System; using System.Threading.Tasks; namespace GDBS.LogService.HttpApi.Hosting {
阅读全文
摘要:1:在实际开发中,我们会经常使用到无限递归的情况,如菜单,父子级等的情况 2:Code 1 using System; 2 using System.Collections.Generic; 3 using ConsoleApp1.Models; 4 using System.Linq; 5 usi
阅读全文
摘要:Core之Windows服务 使用测试之前,先来简单了解一下 window自带的sc命令 install.bat set serviceName=你的服务名称 set serviceFilePath=C:\CoreDemo\WorkerService\bin\Debug\netcoreapp3.0\
阅读全文
摘要:手机端rem简单配置相关 1 <!DOCTYPE html> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head runat="server"> 4 <meta http-equiv="Content-Type" content="text/h
阅读全文
摘要:C# 简单粗暴的毫秒转换成 分秒的格式 1:code(网络上很多存在拷贝或者存在bug的或者不满足自己的要求) 1 public static string RevertToTime(double milliSeconds)//毫秒 2 { 3 double getsecond = milliSec
阅读全文
摘要:这里就做一个简单的使用测试截图: 1:Core3.1命令行的简单使用测试截图:使用场景比如:=> 两套完全一样的代码通过命令行参数实现链接不同的数据库等 2:枚举的值的获取 截图中也可以直接 item.ToString()就能够拿到自定义的枚举类型名称:=> 使用场景:根据枚举来获取下拉列表的数据等
阅读全文
摘要:开发使用场景一(获取到正确的集合SQL字段): 1: 通常我们需要在后台这样来处理SQL,动态获取id集合 ,这样说大家还不是太明白: 这里举一下小例子 例如: //伪代码 1 IDbConnection connection = null; 2 StringBuilder sb = new Str
阅读全文
摘要:1:导入NuGet包 Microsoft.AspNetCore.Authentication.JwtBearer 2:配置 jwt相关信息 3:在 startUp中 1 public void ConfigureServices(IServiceCollection services){ 2 #re
阅读全文

浙公网安备 33010602011771号