Redis bug fix

This commit is contained in:
crusader 2017-09-27 16:56:01 +09:00
parent afcca18ba0
commit 905ebd6adf
2 changed files with 8 additions and 2 deletions

View File

@ -52,7 +52,7 @@ public class NoAuthProbeService {
ApiKey apiKey = apiKeyService.readByApiKey(noAuthProbe.getApiKey());
noAuthProbe.setDomain(apiKey.getDomain());
messagePublisher.publishToDomain("/app", apiKey.getDomain(), "NoAuthProbeService.regist", noAuthProbe);
messagePublisher.publishToDomain("/web", apiKey.getDomain(), "NoAuthProbeService.regist", noAuthProbe);
return this.noAuthProbeDAO.save(noAuthProbe);
}

View File

@ -78,7 +78,13 @@ public class RedisMessagePublisher implements MessagePublisher {
ChannelTopic topic = this.topics.get(channel);
message.setMessage(new PublishMessage.PublishMessageBody(method, this.getMessageBody(params)));
redisTemplate.convertAndSend(topic.getTopic(), message);
try {
String json = this.objectMapper.writeValueAsString(message);
redisTemplate.convertAndSend(topic.getTopic(), json);
} catch (IOException e) {
e.printStackTrace();
}
}
protected List<String> getMessageBody(final Object... params) {