Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring mvc springportletmvc中@RequestMapping(";VIEW";)注释的用途是什么_Spring Mvc_Portlet - Fatal编程技术网

Spring mvc springportletmvc中@RequestMapping(";VIEW";)注释的用途是什么

Spring mvc springportletmvc中@RequestMapping(";VIEW";)注释的用途是什么,spring-mvc,portlet,Spring Mvc,Portlet,在我的SpringPortlet控制器类中,我在类级别上有这样的功能: @Controller @RequestMapping("VIEW") public class myContoller extends AbstractController 现在,@RequestMapping应该将请求url映射到操作处理程序(控制器)。 但是说@RequestMapping(“视图”)有什么用呢 在portlet.xml中,我为这个特定的portlet控制器定义了视图。portlet可以支持不同的模式

在我的SpringPortlet控制器类中,我在类级别上有这样的功能:

@Controller
@RequestMapping("VIEW")
public class myContoller extends AbstractController
现在,
@RequestMapping
应该将请求url映射到操作处理程序(控制器)。 但是说
@RequestMapping(“视图”)有什么用呢


portlet.xml
中,我为这个特定的portlet控制器定义了
视图

portlet可以支持不同的模式(默认为
视图
编辑
帮助
,如果我没记错的话)

portlet.xml中的
VIEW
表示portlet支持
VIEW
模式

@Controller
@RequestMapping("VIEW") 
public class myContoller extends AbstractController
只需将此控制器的
@RequestMapping
注释方法处理的请求限制为在
视图
模式下发送的请求

@Controller
@RequestMapping("VIEW") 
public class myContoller extends AbstractController