本文主要是介绍Spring 整合JMS(activeMQ),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1 点对点模式
1.1消息生产者
(1)创建工程springjms_producer,在POM文件中引入SpringJms 、activeMQ以及单元测试相关依赖
pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>com.wjl.demo</groupId><artifactId>springjms_producer</artifactId><version>0.0.1-SNAPSHOT</version><properties><spring.version>4.2.4.RELEASE</spring.version></properties><dependencies><dependency><groupId>org.springframework</groupId><artifactId>spring-jms</artifactId><version>${spring.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-test</artifactId><version>${spring.version}</version></dependency><dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>4.9</version></dependency><dependency><groupId>org.apache.activemq</groupId><artifactId>activemq-client</artifactId><version>5.13.4</version></dependency></dependencies><
这篇关于Spring 整合JMS(activeMQ)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!