参考文章:http://my.oschina.net/xiaoxishan/blog/381209#OSC_h3_7

一,步骤参照参考文献

二、新建的项目

ActiveMQ实例2--Spring JMS发送消息

三、补充

web.xml

 1 <?xml version="1.0" encoding="UTF-8"?>  
 2 <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"  
 3     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
 4     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee   
 5     http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">  
 6     
 7     <display-name>activemq</display-name>
 8 
 9     <!-- Spring ApplicationContext配置文件的路径,可使用通配符,用于后面的Spring Context Loader -->
10     <context-param>
11         <param-name>contextConfigLocation</param-name>
12         <param-value>
13             classpath:applicationContext.xml
14         </param-value>
15     </context-param>
16 
17     <!--Spring ApplicationContext 载入 -->
18     <listener>
19         <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
20     </listener>
21 
22     <!-- Spring MVC Servlet -->
23     <servlet>
24         <servlet-name>dispatcher</servlet-name>
25         <servlet-class>com.alibaba.dubbo.remoting.http.servlet.DispatcherServlet</servlet-class>
26         <init-param>
27             <param-name>contextConfigLocation</param-name>
28             <param-value>classpath:DispatcherServlet.xml</param-value>
29         </init-param>
30         <load-on-startup>1</load-on-startup>
31     </servlet>
32     <servlet-mapping>
33         <servlet-name>dispatcher</servlet-name>
34         <url-pattern>/</url-pattern>
35     </servlet-mapping>
36 
37     
38     <welcome-file-list>
39         <welcome-file>index.html</welcome-file>
40     </welcome-file-list>
41 </web-app>
View Code

相关文章:

  • 2021-07-11
  • 2021-07-11
  • 2022-12-23
  • 2022-01-16
  • 2021-11-29
  • 2021-06-08
  • 2021-10-19
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-29
  • 2021-12-23
  • 2021-12-28
  • 2021-12-02
  • 2021-05-29
  • 2022-12-23
相关资源
相似解决方案