Swaager配置添加报文头

//配置添加报文头
builder.Services.AddSwaggerGen(c=>
{
varchaemo=newOpenApiSecurityScheme()
{
Desc...
netcore使用JwtBearer生成token并进行验证

先安装jwt包Microsoft.AspNetCore.Authentication.JwtBearer;配置类JwtConfigpublicclassJwtConfig
{
publicst...
NetCore 特性 Attribute 之一个小例子

直接贴代码
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field)]
publicclassRemarkAttribut...
NetCore 事务托管

继承BackgroundService 实现ExecuteAsync方法publicclassScheduledServices:BackgroundService
{
protectedove...