.NET 超流行框架 Furion v4.8.7.9 发布
项目信息 Gitee:https://gitee.com/dotnetchina/Furion Github:https://github.com/MonkSoul/Furion 文档:https://dotnetchina.gitee.io/furion 本期亮点 1.Sql高级代理支持IEnumerable<T>、T[]和Tuple<(IEnumerable<T>, T[], T, List<T>)混合返回值 public interface ISql : ISqlDispatchProxy { [SqlExecute("select * from person where id = @id")] Person GetPerson(int id); [SqlExecute("select * from person where id = @id")] Task<Person> GetPersonAsync(int id); // 异步 // ---------------------------------------- [SqlExecute("select * from person")] List<Person> GetPersons(); [SqlExecute("select * from person")] Task<List<Person>> GetPersonsAsync(); // 异步 // ---------------------------------------- [SqlExecute("select * from person")] Person[] GetPersons(); [SqlExecute("select * from person")] Task<Person[]> GetPersonsAsync(); // 异步 // ---------------------------------------- [SqlExecute("select * from person")] IEnumerable<Person> GetPersons2(); [SqlExecute("select * from person")] Task<IEnumerable<Person>> GetPersons2Async(); // 异步 // ---------------------------------------- // 更复杂的组合 [SqlExecute(@" select * from person where id = 1; select * from person; select * from person where id > 0; select * from person where id > 0; ")] (Person, List<Person>, Person[], IEnumerable<Person>) GetPersons(); // 更复杂的组合 [SqlExecute(@" select * from person where id = 1; select * from person; select * from person where id > 0; select * from person where id > 0; ")] Task<(Person, List<Person>, Person[], IEnumerable<Person>)> GetPersonsAsync(); // 异步 } 2. 定时任务支持Http作业 HTTP请求作业通常用于定时请求/访问互联网地址。 services.AddSchedule(options => { options.AddHttpJob(request => { request.RequestUri = "https://www.chinadot.net"; request.HttpMedhod = HttpMethod.Get; // request.Body = "{}"; // 设置请求报文体 }, Triggers.PeriodSeconds(5)); }); 作业执行日志如下: info: 2023-03-11 11:05:36.3616747 +08:00 星期六 L System.Logging.ScheduleService[0] #1 Schedule hosted service is running. info: 2023-03-11 11:05:36.3652411 +08:00 星期六 L System.Logging.ScheduleService[0] #1 Schedule hosted service is preloading... info: 2023-03-11 11:05:36.5172940 +08:00 星期六 L System.Logging.ScheduleService[0] #1 The <job1_trigger1> trigger for scheduler of <job1> successfully appended to the schedule. info: 2023-03-11 11:05:36.5189296 +08:00 星期六 L System.Logging.ScheduleService[0] #1 The scheduler of <job1> successfully appended to the schedule. warn: 2023-03-11 11:05:36.5347816 +08:00 星期六 L System.Logging.ScheduleService[0] #1 Schedule hosted service preload completed, and a total of <1> schedulers are appended. warn: 2023-03-11 11:05:41.5228138 +08:00 星期六 L System.Logging.ScheduleService[0] #15 Schedule hosted service will sleep <4970> milliseconds and be waked up at <2023-03-11 11:05:46.486>. info: 2023-03-11 11:05:41.5542865 +08:00 星期六 L System.Net.Http.HttpClient.HttpJob.LogicalHandler[100] #9 Start processing HTTP request GET https://www.chinadot.net/ info: 2023-03-11 11:05:41.5589056 +08:00 星期六 L System.Net.Http.HttpClient.HttpJob.ClientHandler[100] #9 Sending HTTP request GET https://www.chinadot.net/ info: 2023-03-11 11:05:44.1305461 +08:00 星期六 L System.Net.Http.HttpClient.HttpJob.ClientHandler[101] #8 Received HTTP response headers after 2566.7836ms - 200 info: 2023-03-11 11:05:44.1343977 +08:00 星期六 L System.Net.Http.HttpClient.HttpJob.LogicalHandler[101] #8 End processing HTTP request after 2584.2327ms - 200 info: 2023-03-11 11:05:48.6475959 +08:00 星期六 L System.Logging.ScheduleService[0] #4 Received HTTP response body with a length of <63639> output as follows - 200 <!DOCTYPE html><html><head> <title>dotNET China | 让 .NET 开发更简单,更通用,更流行</title> ...... </body></html> 本期更新 新特性 [新增]定时任务HTTP作业,支持定时请求互联网URL地址4.8.7.7⏱️2023.03.1101d4466 [新增]定时任务作业触发器Trigger执行结果Result和执行耗时ElapsedTime属性4.8.7.7⏱️2023.03.1101d4466 [新增]定时任务作业看板支持查看作业触发器执行结果Result和执行耗时ElapsedTime属性4.8.7.7⏱️2023.03.1101d4466 [新增] 定时任务休眠时长和唤醒时机日志输出4.8.7.6⏱️2023.03.08#I6LANE [新增]Sql高级拦截支持返回IEnumerable<T>和T[]类型值4.8.7.5⏱️2023.03.07f2ca2d3 [新增].m3u8和.ts文件类型MIME支持4.8.7.5⏱️2023.03.07#I6KKEM [新增] 审计日志LoggingMonitor支持对参数贴[SuppressMonitor]特性跳过记录4.8.7.3⏱️2023.03.01#I6IVGW [新增] 审计日志LoggingMonitor监听TraceId、ThreadId、Accept-Language4.8.7.1⏱️2023.02.27df35201 [新增] 规范化结果UnifyContext.GetSerializerSettings(string)静态方法4.8.7.1⏱️2023.02.27#I6HM7T 突破性变化 [升级]适配.NET8 Preview.14.8.7⏱️2023.02.22 [升级]脚手架支持创建.NET8 Preview.1项目4.8.7⏱️2023.02.22 问题修复 [修复] 定时任务服务在停止进程时会卡住30秒问题4.8.7.8⏱️2023.03.13#I6MI9I#I6MHOU [修复] 定时任务看板删除不存在的作业触发器出现空异常4.8.7.7⏱️2023.03.1101d4466 [修复] 日志消息没有处理\n换行符对齐问题4.8.7.6⏱️2023.03.10759bcc5 [修复] 审计日志LoggingMonitor对特定参数贴有[FromServices]特性依旧记录问题4.8.7.3⏱️2023.03.0117b134e [修复]Swagger接口排序同时指定Tag和Order之后无效4.8.7.2⏱️2023.03.01#I6IQDI#I6IP66 其他更改 [调整]定时任务查看作业触发器运行记录由保存10条改为5条4.8.7.7⏱️2023.03.0701d4466 [调整] 脚手架模板,默认启用主流文件类型MIME支持4.8.7.5⏱️2023.03.07e35cdab [调整] 审计日志LoggingMonitor返回值泛型字符串显示格式4.8.7.1⏱️2023.02.27df35201 文档 [新增]ASP.NET 8 集成文档 [新增].NET7 升级 .NET8文档 [更新] 定时任务文档、中间件文档、规范化结果文档、动态WebAPI文档、日志记录文档、事件总线文档、虚拟文件系统文档、Sql高级代理文档、数据库实体文档、任务队列文档 贡献者 kingling (@kinglinglive)!732!729 ksmy (@ksmy)!731 handsome_by (@handsomeboyyl)!727