我正在使用Spring 3.0.5。我的注释控制器都没有被识别。我有我的应用程序的XML ...无法映射到工作
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<mvc:resources mapping="/static/**" location="/static/"/>
<mvc:annotation-driven/>
<context:component-scan base-package="com.myco.systems.leadsmonitor"/>
我的静态资产正在拾起罚款。但我发现了一个404,当我试图达成一个注解控制器...
package com.myco.systems.leadsmonitor.web.controller;
@Controller
public class HomeController {
…
@RequestMapping("/")
public void index(Model model) {
model.addAttribute("latestLeadTime", MonitorStatistics.getInstance().getLatestLeadCreationTime());
model.addAttribute("lastDBCheck", MonitorStatistics.getInstance().getLastDBCheck());
}
些什么,我需要做的就是我的控制器由Spring回升?谢谢, - 戴夫
什么是在web.xml中用于Spring DispatcherServlet的URL模式? –