using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace AccessStudy.WebApi.Controllers { /// /// 示例控制器 /// [Route("api/[controller]")] [ApiController] public class ValuesController : ControllerBase { /// /// 默认请求 /// /// [HttpGet] public IActionResult Get() { var result = new { Code=0,Message="请求成功"}; return new JsonResult(result); } } }