02 2022 档案

摘要:1:卸载vue-cli脚手架npm uninstall vue-cli -g 旧版本的卸载npm uninstall @vue/cli -g 新版本的卸载2:安装vue/cli 脚手架npm install -g vue-cli 旧版本的安装npm install --global @vue/cli 阅读全文
posted @ 2022-02-26 17:50 yingxianqi 阅读(63) 评论(0) 推荐(0) 编辑
摘要:1:安装vscode 安装vscode (下载地址:https://code.visualstudio.com/Download) 2:在vscode的拓展里面安装对应需要的插件 Ant Design Vue helper、ESLint、JavaScript (ES6) code snippets、 阅读全文
posted @ 2022-02-25 15:45 yingxianqi 阅读(582) 评论(0) 推荐(0) 编辑
摘要:在.net core里面已经没有web.confg这个文件了,配置内容都放在了appsettings.json里面 如果我们要方便在其他地方随时方便快捷的拿到配置节点里面的值怎么办呢? (一)获取json的单个值,然后逐一的对静态对象各个属性赋值 1:可以定义一个静态类 public class C 阅读全文
posted @ 2022-02-23 10:39 yingxianqi 阅读(363) 评论(0) 推荐(0) 编辑
摘要:1:Startup.cs里面的ConfigureServices方法里面添加全局过滤器 services.AddMvc(options => { options.Filters.Add(typeof(ApiAuthorizeFilter)); }); 2:权限过滤器整体校验 public class 阅读全文
posted @ 2022-02-22 10:01 yingxianqi 阅读(1797) 评论(0) 推荐(0) 编辑
摘要:1:生成jwt,此处不能加[Authorize]验证,往往作为登陆接口调用 [Route("/api/Tvl")] [ApiController] public class TvlController : ControllerBase { /// <summary> /// 生成token /// 阅读全文
posted @ 2022-02-21 11:41 yingxianqi 阅读(327) 评论(0) 推荐(0) 编辑
摘要:public class JwtHelper { //生成jwt public static string IssueJwt() { string exp = $"{new DateTimeOffset(DateTime.Now.AddMinutes(120)).ToUnixTimeSeconds( 阅读全文
posted @ 2022-02-18 16:45 yingxianqi 阅读(1249) 评论(0) 推荐(0) 编辑
摘要:1:Startup.cs类的ConfigureServices方法里面新增 string corsUrls = "https://www.xx.yy,http://xxx.yyy.z.hh:xxxx", if (string.IsNullOrEmpty(corsUrls)) { throw new 阅读全文
posted @ 2022-02-18 14:28 yingxianqi 阅读(88) 评论(0) 推荐(0) 编辑
摘要:前后端分离后,登陆系统后生成一个token,然后将呢个token返给前端,前端每次都要带着这个token进行登陆,否则无法访问后端api接口,后端不用去对比,无需存储token,无需对比,后端自动会识别token是否正确,实现了无状态化的验证(无状态化验证) 但是当验证只能在单设备上登陆的时候,必须 阅读全文
posted @ 2022-02-18 09:59 yingxianqi 阅读(190) 评论(0) 推荐(0) 编辑
摘要:(一)windwos服务得调用逻辑 public partial class Service1 : ServiceBase { System.Timers.Timer time;//计时器 public Service1() { InitializeComponent(); } protected 阅读全文
posted @ 2022-02-17 10:12 yingxianqi 阅读(223) 评论(0) 推荐(0) 编辑
摘要:RDB备份机制: save 900 1 #900秒内有至少1个键被更改则进行快照;save 300 10 #300秒内有至少10个键被更改则进行快照;save 60 10000 #60秒内有至少10000个键被更改则进行快照。 AOF备份机制: appendonly yes #开启AOF持久化功能; 阅读全文
posted @ 2022-02-10 10:05 yingxianqi 阅读(43) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示