找不到此localhost页面找不到网址的网页:https://localhost:5001/HTTP错误404
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace CMS.WEBAPI.Controllers
{
[ApiController]
[Route("controller")]
public class CoursesController: ControllerBase
{
public CoursesController()
{
}
[HttpGet]
public string GetCourses()
{
return "hello world";
}
}
}
--
由于找不到页面而出现错误
通过更改路由属性-工作正常。[路由("控制器"(]