5 changed files with 31 additions and 37 deletions
@ -1,27 +1,27 @@ |
|||
package com.ccsens.game.service; |
|||
|
|||
import com.ccsens.util.config.RabbitMQConfig; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.springframework.amqp.rabbit.annotation.RabbitHandler; |
|||
import org.springframework.amqp.rabbit.annotation.RabbitListener; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.io.IOException; |
|||
|
|||
@Slf4j |
|||
@Component |
|||
@RabbitListener(queues = RabbitMQConfig.GAME_MQ_A) |
|||
public class RabbitMQListenerGameTest { |
|||
private Logger logger = LoggerFactory.getLogger(RabbitMQListener.class); |
|||
|
|||
|
|||
@RabbitHandler |
|||
public void gameTest(String gameTest) throws IOException { |
|||
System.out.println("============================="+gameTest); |
|||
// List<GameMessageWithChangeStatusOut> gameMessageList = JacksonUtil.jsonToBean(messageJson,
|
|||
// GameMessageWithChangeStatusOut.class, true);
|
|||
log.info("测试游戏MQ消息 {}",gameTest); |
|||
} |
|||
} |
|||
//package com.ccsens.game.service;
|
|||
//
|
|||
//import com.ccsens.util.config.RabbitMQConfig;
|
|||
//import lombok.extern.slf4j.Slf4j;
|
|||
//import org.slf4j.Logger;
|
|||
//import org.slf4j.LoggerFactory;
|
|||
//import org.springframework.amqp.rabbit.annotation.RabbitHandler;
|
|||
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
|||
//import org.springframework.stereotype.Component;
|
|||
//
|
|||
//import java.io.IOException;
|
|||
//
|
|||
//@Slf4j
|
|||
//@Component
|
|||
//@RabbitListener(queues = RabbitMQConfig.GAME_MQ_A)
|
|||
//public class RabbitMQListenerGameTest {
|
|||
// private Logger logger = LoggerFactory.getLogger(RabbitMQListener.class);
|
|||
//
|
|||
//
|
|||
// @RabbitHandler
|
|||
// public void gameTest(String gameTest) throws IOException {
|
|||
// System.out.println("============================="+gameTest);
|
|||
//// List<GameMessageWithChangeStatusOut> gameMessageList = JacksonUtil.jsonToBean(messageJson,
|
|||
//// GameMessageWithChangeStatusOut.class, true);
|
|||
// log.info("测试游戏MQ消息 {}",gameTest);
|
|||
// }
|
|||
//}
|
|||
|
@ -1,4 +1,4 @@ |
|||
spring: |
|||
profiles: |
|||
active: prod |
|||
include: common, util-prod |
|||
active: dev |
|||
include: common, util-dev |
Loading…
Reference in new issue