WebApi(三)-属性路由 自定义访问路径
启用属性路由:
1.在WebApiConfig中加入如下代码:
//属性路由
config.MapHttpAttributeRoutes();
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAi4AAAEvCAIAAADtnN2wAAAZDUlEQVR4nO3dy5XkKBqGYTlRVpQDY167UDa0AeXXLGc7C80ip6NI/gs/Fwkh3ufEqaMkEBAX8SVEdvRxnudxHCcAAJMcJ1EEAJjqIIcAAHOxKgIATEYUAQAmI4oAAJMRRQCAyf4fRaQRAGAWEggAMBlRBACYjCgCAExGFAEAJiOKAACTEUV4Fv6Yc3O8AfY051U/jlN9v32VW3c9zW1Dsjqynqt/7v2mo/f7nvpPXz9//f66Zcf9Pq01N6ieO2p4beb2rlLfdcH3Emm0oWkvuTuHTh5Ac837+WNLL+mrL+8h7aeNpNOrdewX+tXapu/PWVNm/wdGjurzOra9K4iiDRFFI2ve701RlLUwPIqGzOOsfiKGvxnweiNf78/2Wrpx5B+rW0xZiVPN2dBzaqrjVPuyavYMSW3KarbzsVsbdH5h+iuttc2S3uXsBMrC7KyscvqjjJ90by1dncQLrSdKPf38vhentinPleVWU05f1pAaevd7sagvqPr2OL+/lNabIfheSsuLg8SbDH69s2m0tlD9sVinNB1Hz4rXvGJI8SekpiPlOwazCcI6UOtbpxdPVNPI78iZfOW5/oc3n1lYnqjWPEVa+L3L8uK5Mk6KQ2ro/Qw8Isl/h2SFfgWnZatxvwW81RuiKDKq4torq9wZRcXxyOProugU04T8VbRqUrB+vVWrqb8g+6P90rlB1x9F8d5leW0UWW1GYtjpPTISqfiLQjF+iCLU2iKKGnq5NIo+lYPrsOFRZFWOLFas8vhsskMUnd1rnSFrstp2vtwWRWf9uw5vdWsUHYdSeJZm3mKd0nRcMbxgzc4hfSrcFkXpcbHQacQ6XW2qdp7K7ipO3H5hwynFwrMpDNTG/TarHrv/Y2cUxd82Pasivxp2MD6KDvvPAeTBYXxKf2gf5luV24aUDsYfgKzZOaRPZWuo8Y6c7uQWXHYs5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AAASUVORK5CYII=" alt="" />
2.在Global.asax.cs里修改WebApiConfig.Register(GlobalConfiguration.Configuration)为GlobalConfiguration.Configure(WebApiConfig.Register)
注释:如果不修改会报错(原因暂不明确猜测是高版本才可使用属性路由,烦请知道的人回答一下此问题,感谢!)
此时已经启用,可以在Action上加如:
[Route("api/wyb/test")]
访问为http://localhost:13855/api/wyb/test
每个都要写个api比较麻烦可以在Controller上加一个[RoutePrefix("api")],如此Action只需要[Route("wyb/test")]就可以。当然前缀可是[RoutePrefix("api/test")]等等
这样的话要是有其中某个Action不同可以使用一个波浪符号重写路由前缀[Route("~/api/wyb/test")]
除此之外还可以设置名称:[Route("wyb/test",Name="testName")] (还未验证name可以如何使用)
WebApi(三)-属性路由 自定义访问路径的更多相关文章
- Flask初级(二)为flash创建路由,访问路径。
Project name :Flask_Plan 上一篇文章,我们创建了默认的flask项目,也可以运行起来. 但是只有一个首页,只显示一个hello world. 现在我们创建访问路由,也就是访问地 ...
- centos7一步一步搭建docker jenkins 及自定义访问路径重点讲解
系统环境:centos7.7 (VMware中) 镜像image 版本:jenkins/jenkins (截止2020.01.10最新版) 参考文章:https://www.jianshu.com/p ...
- Web API中的路由(二)——属性路由
一.属性路由的概念 路由让webapi将一个uri匹配到对应的action,Web API 2支持一种新类型的路由:属性路由.顾名思义,属性路由使用属性来定义路由.通过属性路由,我们可以更好地控制We ...
- Spring boot 默认静态资源路径与手动配置访问路径
在application.propertis中配置 ##端口号server.port=8081 ##默认前缀spring.mvc.view.prefix=/## 响应页面默认后缀spring.mvc. ...
- Spring boot 默认静态资源路径与手动配置访问路径的方法
这篇文章主要介绍了Spring boot 默认静态资源路径与手动配置访问路径的方法,非常不错,具有参考借鉴价值,需要的朋友可以参考下 在application.propertis中配置 ##端口号 ...
- springboot系列三、springboot 单元测试、配置访问路径、多个配置文件和多环境配置,项目打包发布
一.单元测试 生成的demo里面包含spring-boot-starter-test :测试模块,包括JUnit.Hamcrest.Mockito,没有的手动加上. <dependency> ...
- WebApi 2:属性路由 [Route()],attribute routing
原文:http://www.asp.net/web-api/overview/web-api-routing-and-actions/attribute-routing-in-web-api-2 属性 ...
- MVC 5 属性路由中添加自己的自定义约束
介绍约束 ASP.NET MVC和web api 同时支持简单和自定义约束,简单的约束看起来像: routes.MapRoute("blog", "{year}/{mon ...
- SpringBoot系列三:SpringBoot基本概念(统一父 pom 管理、SpringBoot 代码测试、启动注解分析、配置访问路径、使用内置对象、项目打包发布)
声明:本文来源于MLDN培训视频的课堂笔记,写在这里只是为了方便查阅. 1.了解SpringBoot的基本概念 2.具体内容 在之前所建立的 SpringBoot 项目只是根据官方文档实现的一个基础程 ...
随机推荐
- Spring技术内幕——深入解析Spring架构与设计原理(一)IOC实现原理
IOC的基础 下面我们从IOC/AOP开始,它们是Spring平台实现的核心部分:虽然,我们一开始大多只是在这个层面上,做一些配置和外部特性的使用工作,但对这两个核心模块工作原理和运作机制的理解,对深 ...
- linux 环境下java环境配置
vi + /etc/profile向文件里面追加以下内容:JAVA_HOME=/usr/local/java7JRE_HOME=/usr/local/java7/jrePATH=$PATH:$JAVA ...
- VS扩展CodeMaid代码整理插件
本文章转载:http://www.cnblogs.com/wintersun/p/3577039.html 官方地址:http://www.codemaid.net/ 开源VS扩展CodeMaid介绍 ...
- 将动态库添加到VC程序中
应用程序使用DLL可以采用两种方式:一种是隐式链接,另一种是显式链接.在使用DLL之前首先要知道DLL中函数的结构信息.Visual C++6.0在VC\bin目录下提供了一个名为Dumpbin.ex ...
- POJ 1185 炮兵
是中国标题.大家都说水问题.但是,良好的1A它? 标题效果: 给出n*m的矩阵,当某个单元格有炮兵部队时它的上下左右两格(不包含斜着的方向)是这支部队的攻击范围.问在两支部队之间不可能相互攻击到的情况 ...
- HDU 1576 A/B 扩展欧几里德算法
A/B Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submis ...
- android 75 新闻列表页面
new.xml <?xml version="1.0" encoding="UTF-8" ?> <newslist> <news& ...
- LabVIEW系列——生产现场故障邮件通知
第一步.建立邮件服务器,winmail做邮件服务器是个不错的选择.不过在使用前需要注册. 第二步.创建修改域名.这里创建的域名不是真正的域名,只能用于局域网内.假设:lhy.com.cn 第三步.创建 ...
- PureMVC(JS版)源码解析(十一):Model类
这篇博文讲PureMVC三个核心类——Model类.Model类的构造函数及工厂函数[即getInstance()方法]和View类.Controller类是一样的,这里就不重复讲解了,只 ...
- Android(java)学习笔记184:生成 4种 不同权限的文件
1.首先我们编写一个生成 4种 不同权限的文件的程序案例: (1)首先是activity_main.xml文件: <RelativeLayout xmlns:android="http ...