【问题标题】:How to configure spring mvc project which contains controller both annotated and configured如何配置包含注释和配置的控制器的spring mvc项目
【发布时间】:2013-06-14 08:45:40
【问题描述】:

谁能告诉我,如何配置包含注释和配置的控制器的spring mvc项目??

我想使用 ParametrizedViewController 配置静态页面,其余的都使用 Annotations。

但它不起作用??

请有人告诉配置文件(在我的例子中是 dispatcher-servlet.xml),它将包含这两个要求。

提前致谢。

【问题讨论】:

    标签: spring-mvc annotations configuration-files


    【解决方案1】:
    <!-- Registering MVC stuff necessary for @RequestMapping -->
    <mvc:annotation-driven />
    <!-- Your view controller definition -->
    <mvc:view-controller path="/home" view-name="home" /> 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-03-23
      • 1970-01-01
      • 2016-02-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-11
      • 1970-01-01
      相关资源
      最近更新 更多