随笔分类 -  开发

摘要:参考 常见的缓存更新策略共有3种: Cache Aside(旁路缓存)策略; Read/Write Through(读穿 / 写穿)策略; Write Back(写回)策略; Cache Aside(旁路缓存)策略 Cache Aside(旁路缓存)策略是最常用的,应用程序直接与「数据库、缓存」交互 阅读全文
posted @ 2024-03-27 11:27 Kelvin's 阅读(87) 评论(0) 推荐(0)
摘要:Dto Dto设置参考 [ExcelImporter(IsLabelingError = true)] public class MyDto { [ImporterHeader(Name = "序号")] [ExporterHeader(DisplayName = "序号")] public int 阅读全文
posted @ 2024-01-16 17:20 Kelvin's 阅读(142) 评论(0) 推荐(0)
摘要:发布命令 发布时,进入到Host文件夹路径下 dotnet publish -c XXX 发布完成会生成一个XXX文件夹,里面\net6.0\publish就是发布的程序了 运行命令 运行时,进入到publish文件夹,并在此处打开终端 设置运行端口为8888,使用配置文件appSettings.X 阅读全文
posted @ 2023-11-13 10:35 Kelvin's 阅读(1021) 评论(0) 推荐(0)
摘要:参考 Reference 引用某个程序集 PackageReference 引用某个 NuGet 包 ProjectReference 引用某个项目 Compile 常规的 C# 编译 None 没啥特别的编译选项,就为了执行一些通用的操作(或者是只是为了在 Visual Studio 列表中能够有 阅读全文
posted @ 2023-10-18 14:25 Kelvin's 阅读(95) 评论(0) 推荐(0)
摘要:Service public interface ITestFileService : IApplicationService { public Task<string> getDownloadUrl(); } public class TestFileService : XXXManagement 阅读全文
posted @ 2023-10-18 08:56 Kelvin's 阅读(290) 评论(1) 推荐(0)
摘要:仅当局部变量在相同语句中进行声明和初始化时,才能使用 var;变量不能初始化为 null,也不能初始化为方法组或匿名函数。 参考 阅读全文
posted @ 2023-10-11 13:22 Kelvin's 阅读(169) 评论(0) 推荐(0)
摘要:定义一个自定义的配置文件 在调试配置中设置启动环境 这里的值填入刚刚设置的配置文件appsetings.{配置文件名字}.json 的配置文件名字 启动即可 系统启动时,首先会检查{配置文件名字}是否存在,存在的话使用appsettings.{配置文件名字}.json,不存在则使用appsettin 阅读全文
posted @ 2023-10-10 16:46 Kelvin's 阅读(219) 评论(0) 推荐(0)
摘要:参考 列名 public class Blog { [Column("blog_id")] public int BlogId { get; set; } public string Url { get; set; } } 列数据类型 public class Blog { public int B 阅读全文
posted @ 2023-10-10 14:35 Kelvin's 阅读(70) 评论(0) 推荐(0)
摘要:Decimal报错: No store type was specified for the decimal property 'GridElectricityPurchase' on entity type 'ChargeDischarge'. This will cause values to 阅读全文
posted @ 2023-10-10 12:02 Kelvin's 阅读(257) 评论(0) 推荐(0)
摘要:internal权限修饰符 示例1: 此示例包含两个文件,即 Assembly1.cs 和 Assembly1_a.cs。 第一个文件包含内部基类 BaseClass。 在第二个文件中,尝试实例化 BaseClass 会产生错误。 // Assembly1.cs // Compile with: / 阅读全文
posted @ 2023-09-26 10:23 Kelvin's 阅读(46) 评论(0) 推荐(0)
摘要:前端控制: 给普通角色配置签收的权限 后端权限控制: /** * 验证用户是否具备某权限 * * @param permission 权限字符串 * @return 用户是否具备某权限 */ public boolean hasPermi(String permission) /** * 验证用户是 阅读全文
posted @ 2022-11-16 11:30 Kelvin's 阅读(2447) 评论(0) 推荐(0)
摘要:不传参 computed: { // 仅读取 aDouble: function () { return this.a * 2 }, // 读取和设置 aPlus: { get: function () { return this.a + 1 }, set: function (v) { this. 阅读全文
posted @ 2022-08-22 18:22 Kelvin's 阅读(25) 评论(0) 推荐(0)
摘要:参考 单例设计模式 在我们的系统中,有一些对象其实我们只需要一个,比如说:线程池、缓存、对话框、注册表、日志对象、充当打印机、显卡等设备驱动程序的对象。事实上,这一类对象只能有一个实例,如果制造出多个实例就可能会导致一些问题的产生,比如:程序的行为异常、资源使用过量、或者不一致性的结果。 使用单例模 阅读全文
posted @ 2022-08-12 20:29 Kelvin's 阅读(24) 评论(0) 推荐(0)
摘要:参考 父组件 <div class="formRight"> <div class="formRightLuckysheet"> <preview :id="businessId" :tableTemplateId1="tableTemplateId" ref="luckysheetPreview" 阅读全文
posted @ 2022-07-22 10:16 Kelvin's 阅读(158) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-07-05 10:39 Kelvin's 阅读(38) 评论(0) 推荐(0)
摘要:const target = { a: 1, b: 2 }; const source = { b: 4, c: 5 }; const returnedTarget = Object.assign(target, source); console.log(target); // expected o 阅读全文
posted @ 2021-06-15 13:43 Kelvin's 阅读(82) 评论(0) 推荐(0)
摘要:在SpringBoot中启动Netty 方式1 设置一个ApplicationListener @Component public class NettyBooter implements ApplicationListener<ContextRefreshedEvent>{ @Override p 阅读全文
posted @ 2021-05-22 20:43 Kelvin's 阅读(4582) 评论(0) 推荐(0)
摘要:SpringUtil报空处理 SpringUtil工具类 package com.kelvin.nettydemo; import org.springframework.beans.BeansException; import org.springframework.context.Applica 阅读全文
posted @ 2021-05-22 19:55 Kelvin's 阅读(406) 评论(0) 推荐(0)