1 2 3 4 5 6 7 8 9 10 11 12 13 | <servlet> <servlet-name>CartServlet</servlet-name> <servlet-class> org.springframework.web.servlet.DispatcherServlet </servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/config/web-application-config.xml </param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> |
1 2 3 4 | <servlet-mapping> <servlet-name>CartServlet</servlet-name> <url-pattern>/spring/*</url-pattern> </servlet-mapping> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <?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:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd"> <!-- 搜索 samples.webflow 包里的 @Component 注解,并将其部署到容器中 --> <context:component-scan base-package="samples.webflow" /> <!-- 启用基于注解的配置 --> <context:annotation-config /> <import resource="webmvc-config.xml"/> </beans> |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |