asp.net Core 配置默认
app.UseFileServer(new FileServerOptions() { FileProvider = new PhysicalFileProvider(env.ContentRootPath), RequestPath = new PathString(""), EnableDefaultFiles = true,//启用默认文件 EnableDirectoryBrowsing = false//关闭目录浏览 });
app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller}/{action}/{id?}", defaults: new { group = "core", app = "User", controller = "User", action = "index" });//默认打开路径