.net core3.1过滤器设置优先级 电脑版发表于:2020/12/8 16:53 通过设置order即可。 ``` public void ConfigureServices(IServiceCollection services) { services.AddControllersWithViews(); services.AddMvc(a => { //全局注入筛选器 //a.Filters.Add(new TestActionFilter()); //a.Filters.Add(new MySampleActionFilter()); a.Filters.Add(typeof(TestActionFilter), 10); a.Filters.Add(typeof(MySampleActionFilter), 1); }); } ```