zoukankan      html  css  js  c++  java
  • RoutePrefix和Route 路由前缀

    使用应用到某个控制器中所有操作的路由前缀来批注该控制器。

    web api

    /// <summary>
        ////// </summary>
        [RoutePrefix("web/Business")]
        public class BusinessController : ApiController
        {
            /// <summary>
            ////// </summary>
            /// <param name="request"></param>
            /// <returns></returns>
            [Route("GetData"), System.Web.Http.HttpGet]
            public BusinessResponse GetData([FromUri]BusinessRequest request)
            {
                BusinessResponse response = new BusinessResponse();
                response = Service.Execute(request);return response;
            }
        }

    前端调用

    var VueDataService = {
        apiUrls: {
            getUrl: BPMUtil.apiBasePath + "/Web/Business/GetData"
        },
        getFormData: function (id) {
            return axios.get(this.apiUrls.getUrl + "?request.recordId=" + id);
        }
    };
  • 相关阅读:
    spring guides
    Go 汇编入门
    go内存管理
    websocket
    Scheduling In Go
    log-structured-merge-trees
    InfluxDB 内部机制解析
    thread-states
    MySQL高可用方案
    Amazon Aurora解读
  • 原文地址:https://www.cnblogs.com/xuguanghui/p/7007813.html
Copyright © 2011-2022 走看看