当我单击welcome.jsp 中的任何链接时,我收到警告 PageNotFound:1136 - 在 DispatcherServlet 中,名称为“spring”的 URI [/CATestSlotBooking/show] 未找到 HTTP 请求的映射。
下面是控制器类
@Controller
public class BookingSlotController {
@RequestMapping(value = "/show", method = RequestMethod.GET)
public String showBookingPage(ModelMap model) {
BookingSlotVO bookingDetailsVO = new BookingSlotVO();
model.addAttribute("bookingSlotVO", bookingDetailsVO);
return "booking";
}
调度程序 servlet MXL
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<context:annotation-config />
<context:component-scan base-package="com.cts" />
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/views/" />
<property name="suffix" value=".jsp" />
</bean>
<bean id="localeResolver" class="org.springframework.web.servlet.i18n.SessionLocaleResolver">
<property name="defaultLocale" value="en" ></property>
</bean>
<mvc:interceptors>
<bean id="localChangeInterceptor" class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
<property name="paramName" value="lang" />
</bean>
</mvc:interceptors>
</beans>
BIG阳
相关分类