In a Spring MVC application, the URL can logically be divided into five parts (see the following figure); the @RequestMapping annotation only matches against the URL request path. It omits the scheme, hostname, application name, and so on.

The @RequestMapping annotation has one more attribute called method to further narrow down the mapping based on the HTTP request method types (GET, POST, HEAD, OPTIONS, PUT, DELETE, and TRACE). If we do not specify the method attribute in the @RequestMapping annotation, the default method will be GET.

The logical parts of a typical Spring MVC application URL

Spring MVC mapping[From Spring MVC Beginner's Guide]的更多相关文章

  1. 关于spring 3.0.5的 <mvc:resources mapping="***" location="***">标签的使用

    spring mvc 的<mvc;resources mapping="***" location="***">标签是在spring3.0.4出现的 ...

  2. Spring Framework------>version4.3.5.RELAESE----->Reference Documentation学习心得----->Spring Framework中的spring web MVC模块

    spring framework中的spring web MVC模块 1.概述 spring web mvc是spring框架中的一个模块 spring web mvc实现了web的MVC架构模式,可 ...

  3. spring mvc拦截器和<mvc:annotation-driven />的详解

    MVC的拦截器 经本人在Spring mvc中对方案1和方案2的测试表明,并没有拦截静态资源,所以可以放心使用方案1和方案2,方案3可以放弃,并且可以放心使用<mvc:annotation-dr ...

  4. Spring MVC静态资源处理——<mvc:resources /> ||<mvc:default-servlet-handler /> 转载

    Spring MVC静态资源处理——<mvc:resources /> ||<mvc:default-servlet-handler /> mvcmvc:resources  ...

  5. 【Spring】15、spring mvc路径匹配原则

    Ant path 匹配原则 在Spring MVC中经常要用到拦截器,在配置需要要拦截的路径时经常用到<mvc:mapping/>子标签,其有一个path属性,它就是用来指定需要拦截的路径 ...

  6. java面试题之----spring MVC的原理和MVC

    1.什么是mvc? 1.1原始比较初级的设计模式: 1.2 MVC设计模式 2MVC设计模式的优势与核心在于其能解耦和: 传统的设计模式相当于是一个串联的设计,只要其中一个环节出了问题便会使下一环节中 ...

  7. Spring MVC 学习笔记 spring mvc Schema-based configuration

    Spring mvc 目前支持5个tag,分别是 mvc:annotation-driven,mvc:interceptors,mvc:view-controller, mvc:resources和m ...

  8. Spring MVC(十六)--Spring MVC国际化实例

    上一篇文章总结了一下Spring MVC中实现国际化所需的配置,本文继上一文举一个完整的例子,我选择用XML的方式.我的场景是这样的: 访问一个页面时,这个页面有个表格,对表头中的列名实现国际化. 第 ...

  9. spring.Net之Ioc在MVC中的使用

    1.引入dll Common.Logging.dll Spring.Core.dll Spring.Web.dll Spring.Web.Extensions.dll Spring.Web.Mvc4. ...

随机推荐

  1. 无法运行maven项目

    tomcat Server Location 选择 User Tomcat installation 设置CATALINA_HOME环境变量(tomcat start.bat启动不了)1.CATALI ...

  2. C#反射动态调用dll中的方法

    //加载程序集(dll文件地址),使用Assembly类 Assembly assembly = Assembly.LoadFile(AppDomain.CurrentDomain.BaseDirec ...

  3. 设置Safari浏览器在标签栏上打开新窗口,而不是弹出一个新窗口

    打开Safari浏览器的偏好设置,如图: 打开“标签”一项,如上图.在“在标签(而不是窗口)中打开页面:”中设置.

  4. [leetcode]_Climbing Stairs

    我敢保证这道题是在今早蹲厕所的时候突然冒出的解法.第一次接触DP题,我好伟大啊啊啊~ 题目:一个N阶的梯子,一次能够走1步或者2步,问有多少种走法. 解法:原始DP问题. 思路: 1.if N == ...

  5. 安卓手机的touchend事件不触发问题

    问题描述 $(document).on("touchstart touchmove",".btn-highlight",function(event){ $(t ...

  6. php 实现多线程

    通过php的Socket方式实现php程序的多线程.php本身是不支持多线程的,那么如何在php中实现多线程呢?可以想一下,WEB服务器本身都是支持多线程的.每一个访问者,当访问WEB页面的时候,都将 ...

  7. Vmware为Ubuntu安装VmTools

    From:http://www.cnblogs.com/killerlegend/p/3632443.html Author:KillerLegend 1:首先打开Vmware并运行里面的Ubuntu ...

  8. SpringMVC综合使用手机管理系统Controller层开发

    1. beans.xml的配置 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns=&qu ...

  9. oracle自定义job名字,job调度

    一.调试创建 begin -- create_schedule dbms_scheduler.create_schedule(schedule_name => 's_change_send_da ...

  10. Android--发送短信,并且通知发送方

    1.发送短信涉及到权限,我们需要把权限加上 2.当我们发送短信时,不管发送是否成功,接收方是否接收到,系统都会发送广播 3.这时我们注册广播去接收一下就可以了 4.布局文件很简单,里面就两个EditT ...