提交 9770699d authored 作者: linzhenjie's avatar linzhenjie

修改配置信息

上级 a8ab1357
......@@ -84,7 +84,7 @@ pay:
logging:
level:
root: info
com.gltech: debug
tech.glinfo: debug
path: ./logs/appapi
file: appapi.log
......
......@@ -84,7 +84,7 @@ pay:
logging:
level:
root: info
com.gltech: debug
tech.glinfo: debug
path: ./logs/appapi
file: appapi.log
......
......@@ -86,7 +86,7 @@ pay:
logging:
level:
root: info
com.gltech: debug
tech.glinfo: debug
path: ./logs/appapi
file: appapi.log
......
......@@ -86,7 +86,7 @@ pay:
logging:
level:
root: info
com.gltech: debug
tech.glinfo: debug
path: ./logs/appapi
file: appapi.log
......
package tech.glinfo.enbao.config;
import tech.glinfo.enbao.common.contants.AppContants;
import org.apache.activemq.command.ActiveMQQueue;
import org.apache.activemq.command.ActiveMQTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jms.config.DefaultJmsListenerContainerFactory;
import org.springframework.jms.config.JmsListenerContainerFactory;
import javax.jms.ConnectionFactory;
import javax.jms.Queue;
import javax.jms.Topic;
@Configuration
public class MyActiveMqConfig {
@Bean
public Queue sendQueue() {
return new ActiveMQQueue(AppContants.RECEIVE_QUEUE);
}
@Bean
public Queue sendPushQueue() {
return new ActiveMQQueue(AppContants.PUSH_QUEUE);
}
@Bean
public Topic sendTopic(){
return new ActiveMQTopic(AppContants.SEND_TOPIC);
}
@Bean
public Topic websocketTopic(){
return new ActiveMQTopic(AppContants.WEBSOCKET_TOPIC);
}
//Topic模式
@Bean
public JmsListenerContainerFactory<?> jmsListenerContainerTopic(ConnectionFactory connectionFactory) {
DefaultJmsListenerContainerFactory bean = new DefaultJmsListenerContainerFactory();
bean.setPubSubDomain(true);
bean.setConnectionFactory(connectionFactory);
return bean;
}
//Queue模式
@Bean
public JmsListenerContainerFactory<?> jmsListenerContainerQueue(ConnectionFactory connectionFactory) {
DefaultJmsListenerContainerFactory bean = new DefaultJmsListenerContainerFactory();
bean.setConnectionFactory(connectionFactory);
return bean;
}
}
\ No newline at end of file
......@@ -13,7 +13,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.8.RELEASE</version>
<version>2.2.4.RELEASE</version>
</parent>
<properties>
......@@ -91,6 +91,10 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-activemq</artifactId>
</dependency>
<dependency>
<groupId>org.messaginghub</groupId>
<artifactId>pooled-jms</artifactId>
</dependency>
<!--<dependency>-->
<!--<groupId>org.springframework.boot</groupId>-->
<!--<artifactId>spring-boot-devtools</artifactId>-->
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论