通过注解的方式实现一个简单的HelloWorld。一、新建项目同SpringMVC_HelloWorld_01不同的是springmvc配置文件的命名和路径,此处为src/springmvc.二、配置文件1、配置web.<??><web-app ="h ...
通过注解的方式实现一个简单的HelloWorld。
一、新建项目
同SpringMVC_HelloWorld_01
不同的是springmvc配置文件的命名和路径,此处为src/springmvc.
二、配置文件
1、配置web.<??><web-app ="http://www.w3.org/2001/ ="http://java.sun.com/ xsi:schemaLocation="http://java.sun.com/ id="WebApp_ID" version="3.0"> <!-- The front controller of this Spring Web application, responsible for handling all application requests --> <servlet> <servlet-name>springDispatcherServlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:springmvc.</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <!-- Map all requests to the DispatcherServlet for handling --> <servlet-mapping> <servlet-name>springDispatcherServlet</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping></web-app>
原标题:SpringMVC_HelloWorld_03
关键词:Spring
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。