From b7c146e1bd40ebf2212e3d20fb0740f977927e48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E8=87=BB?= Date: Tue, 13 Mar 2018 14:12:07 +0800 Subject: [PATCH] fix SimpMessagingTemplate injection in ZuulWebSocketConfiguration.java --- .../netflix/zuul/web/socket/ZuulWebSocketConfiguration.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/github/mthizo247/cloud/netflix/zuul/web/socket/ZuulWebSocketConfiguration.java b/src/main/java/com/github/mthizo247/cloud/netflix/zuul/web/socket/ZuulWebSocketConfiguration.java index 4eb1028..5d8b4f2 100644 --- a/src/main/java/com/github/mthizo247/cloud/netflix/zuul/web/socket/ZuulWebSocketConfiguration.java +++ b/src/main/java/com/github/mthizo247/cloud/netflix/zuul/web/socket/ZuulWebSocketConfiguration.java @@ -42,6 +42,7 @@ import org.springframework.context.ApplicationListener; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Primary; import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.messaging.converter.MessageConverter; @@ -86,6 +87,7 @@ public class ZuulWebSocketConfiguration extends AbstractWebSocketMessageBrokerCo implements ApplicationListener { @Autowired ZuulWebSocketProperties zuulWebSocketProperties; + @Lazy @Autowired SimpMessagingTemplate messagingTemplate; @Autowired