WebEnh

.net7 mvc jquery bootstrap json 学习中 第一次学PHP,正在研究中。自学进行时... ... 我的博客 https://enhweb.github.io/ 不错的皮肤:darkgreentrip,iMetro_HD
  首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2019年8月30日

摘要: 目录(?)[+] 分布式锁一般有三种实现方式: 可靠性 分布式锁一般有三种实现方式: 1. 数据库乐观锁; 2. 基于Redis的分布式锁; 3. 基于ZooKeeper的分布式锁。本篇博客将介绍第二种方式,基于Redis实现分布式锁。虽然网上已经有各种介绍Redis分布式锁实现的博客,然而他们的实 阅读全文

posted @ 2019-08-30 14:34 WebEnh 阅读(389) 评论(0) 推荐(0) 编辑

摘要: setting.json { "compilerOptions": { "noImplicitAny": false, "noEmitOnError": true, "removeComments": false, "sourceMap": true, "target": "es5" }, "exc 阅读全文

posted @ 2019-08-30 14:30 WebEnh 阅读(189) 评论(0) 推荐(0) 编辑

摘要: 目录(?)[+] 简单示例 监控属性(Observables) 简单示例 <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> </head> <body> <!-- <span data-bind="text: personN 阅读全文

posted @ 2019-08-30 14:28 WebEnh 阅读(296) 评论(0) 推荐(0) 编辑

摘要: 目录(?)[+] 开发同学的福利--mysql监控工具sqlprofiler,类似sqlserver的profiler工具 字符串配置 http://www.profilesql.com/download/ 开发同学的福利--mysql监控工具sqlprofiler,类似sqlserver的prof 阅读全文

posted @ 2019-08-30 14:25 WebEnh 阅读(1115) 评论(0) 推荐(0) 编辑

摘要: 目录(?)[+] 基础定义 用于引发和调度事件的延迟方法 AddDomainEvent 聚合根 Goods.cs Organization.cs CQRS 1. 创建命令 2. 创建处理 3. 使用 IoC 的域事件调度程序 事件列表 资料: 用于引发和调度事件的延迟方法 AddDomainEven 阅读全文

posted @ 2019-08-30 14:23 WebEnh 阅读(990) 评论(0) 推荐(0) 编辑

摘要: Model表 public class Goods { public string ID { get; set; } public string CreatedBy { get; set; } public DateTime CreatedTime { get; set; } public stri 阅读全文

posted @ 2019-08-30 14:22 WebEnh 阅读(486) 评论(0) 推荐(0) 编辑

摘要: 目录(?)[+] 参数 HttpRequest HttpContext 数据绑定 2.1. Model Binding 2.2. Attribute Binding 示例1 FromHeader 示例2 输出结果 模型验证 自定义Validation Attributes 参考: HttpReque 阅读全文

posted @ 2019-08-30 14:21 WebEnh 阅读(3242) 评论(0) 推荐(0) 编辑

摘要: 目录(?)[+] 简介 内置Tag Helpers列表 表单相关Tag Helpers: 缓存: 其他: 其他标记详解 Script and Link Tag Helpers 缓存 TagHelper vary-by 属性 分布式 Cache 表单 Form Input Lable TextArea 阅读全文

posted @ 2019-08-30 14:20 WebEnh 阅读(268) 评论(0) 推荐(0) 编辑

摘要: 目录(?)[+] 中间件(Middleware)的作用 中间件(Middleware)和过滤器(Filter)的区别 什么情况我们需要中间件 中间件的运行方式 app.Run() app.Use(); app.Map() 封装中间件 参考: app.Run() app.Use(); app.Map( 阅读全文

posted @ 2019-08-30 14:19 WebEnh 阅读(285) 评论(0) 推荐(0) 编辑

摘要: 目录(?)[+] 安装 基本用法 RabbitMQ消费失败的处理 使用RabbitMQ的Exchange Direct Exchange Fanout Exchange Topic Exchange 问题: None of the specified endpoints were reachable 阅读全文

posted @ 2019-08-30 14:15 WebEnh 阅读(759) 评论(1) 推荐(0) 编辑

摘要: ASP.NET WebApi 2 中的示例代码: [Route("values/{id}")] public async Task<HttpResponseMessage> Get(string id) { var response = Request.CreateResponse(HttpStat 阅读全文

posted @ 2019-08-30 14:14 WebEnh 阅读(1262) 评论(0) 推荐(0) 编辑

摘要: 目录(?)[+] 官网的例子 跨域 cookie cookie 参考:https://docs.microsoft.com/zh-cn/aspnet/core/tutorials/first-web-api?view=aspnetcore-2.1 官网的例子 直接去看,这里写用到的代码 创建一个mo 阅读全文

posted @ 2019-08-30 14:13 WebEnh 阅读(272) 评论(0) 推荐(0) 编辑

摘要: 目录(?)[+] 基础用法 日志事件 ID NLog 输出到文件 ASP.NET Core 中的日志记录https://docs.microsoft.com/zh-cn/aspnet/core/fundamentals/logging/?view=aspnetcore-2.1 日志级别:Trace 阅读全文

posted @ 2019-08-30 14:11 WebEnh 阅读(317) 评论(0) 推荐(0) 编辑

摘要: 目录(?)[+] 缓存 缓存在内存中 ASP.NET Core 分布式缓存 Session 问题: Session 保存之后取不到值的解决方案 缓存在内存中 ASP.NET Core 分布式缓存 问题: Session 保存之后取不到值的解决方案 Session 保存之后取不到值的解决方案 缓存 缓 阅读全文

posted @ 2019-08-30 14:04 WebEnh 阅读(585) 评论(0) 推荐(0) 编辑

摘要: 目录(?)[+] 生命周期 注册程序集的所有类 其他类注入 手动获取注入 内置服务 指定要由 web 主机使用的环境 指定要由 web 主机使用的环境 1.生命周期 内置的IOC有三种生命周期:Transient: Transient服务在每次被请求时都会被创建。这种生命周期比较适用于轻量级的无状态 阅读全文

posted @ 2019-08-30 14:01 WebEnh 阅读(405) 评论(0) 推荐(0) 编辑