摘要: 原镜像源下载速度较慢,所以先切换到阿里的镜像源 进入到镜像源所在文件夹 cd /etc/apt 将现有的sources.list文件进行备份 sudo cp sources.list sources.list.bak 进入sources.list修改镜像源 进入sources.list sudo n 阅读全文
posted @ 2023-05-18 16:18 没有童话的鱼 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 授权JWT类JwtHelper.cs 1 /// <summary> 2 /// 授权JWT类 3 /// </summary> 4 public class JwtHelper 5 { 6 private readonly IConfiguration _configuration; 7 8 // 阅读全文
posted @ 2023-05-15 14:45 没有童话的鱼 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 最近在项目中对webapi进行了jwt验证,做一个记录 有关于jwt生成和验证token的操作全部记录在jwthelper.cs文件中: /// <summary> /// 授权JWT类 /// </summary> public class JwtHelper { public readonly 阅读全文
posted @ 2023-02-28 11:23 没有童话的鱼 阅读(109) 评论(0) 推荐(0) 编辑
摘要: import os.path import requests from lxml import etree import xlwt import xlrd def create_excel(): if not os.path.exists('./lianjia_excel.xls'): book = 阅读全文
posted @ 2022-10-24 20:05 没有童话的鱼 阅读(55) 评论(0) 推荐(0) 编辑
摘要: import os.path import requests from lxml import etree if __name__ == '__main__': if not os.path.exists('./jianli'): os.mkdir('./jianli') headers = { ' 阅读全文
posted @ 2022-10-19 18:22 没有童话的鱼 阅读(87) 评论(0) 推荐(0) 编辑
摘要: import os.path import requests from bs4 import BeautifulSoup if __name__ == '__main__': if not os.path.exists('./sanguoyanyi'): os.mkdir('./sanguoyany 阅读全文
posted @ 2022-10-18 20:20 没有童话的鱼 阅读(175) 评论(0) 推荐(0) 编辑
摘要: import os.path import re import requests if __name__ == '__main__': # 如果不存在该文件夹则进行创建 if not os.path.exists('./saimenshibo'): os.mkdir('./saimenshibo') 阅读全文
posted @ 2022-10-18 17:57 没有童话的鱼 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 在Program.cs中使用Autofac工厂去替代默认工厂: public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .ConfigureLogging(loggi 阅读全文
posted @ 2022-02-24 17:09 没有童话的鱼 阅读(55) 评论(0) 推荐(0) 编辑
摘要: 第一种方式: 在Startup中的ConfigureServices方法中注册服务: services.AddTransient<ITestServiceA, TestServiceA>(); 在控制器中通过构造函数进行注入: private readonly ITestServiceA _ITes 阅读全文
posted @ 2022-02-17 19:15 没有童话的鱼 阅读(356) 评论(0) 推荐(0) 编辑
摘要: 最近IIS发布Core3.1项目的时候遇到下面问题,发现是缺少ASP.NET Core Runtime 解决方法:安装.netcore host 版本 阅读全文
posted @ 2022-02-17 15:47 没有童话的鱼 阅读(274) 评论(0) 推荐(0) 编辑