/spring/fetchAllUsers URL which am trying
web.xml
<servlet>
<servlet-name>user</servlet-name>
<servlet-class> org.springframework.web.servlet.DispatcherServlet </servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:springContext/dataSource.xml</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>user</servlet-name>
<url-pattern>/spring/</url-pattern>
</servlet-mapping>
Controller Code
@RequestMapping(value = "/getAllUsers", method = RequestMethod.POST)
@ResponseBody
@Transactional(propagation=Propogation.REQUIRED,rollBackFor=Exception.class)
public String fetchAllUsers(){
setInputStream(userDelegate.fetchAllUsers());
return success;
詳情:
我有MVC註釋驅動和用戶servlet.xml中MVC默認的servlet處理程序時,這個網址是Struts來春季遷徙得到404錯誤
Getting 404 error code when try to access this URl when doing migration from struts to spring
斷點不打併且在控制檯中也沒有錯誤。請在上述問題上提出建議
你會在理解Spring框架時遇到一些困難。 –