Browse Source

Use AbstractWebSocketMessageBrokerConfigurer

Fix the build by extending AbstractWebSocketMessageBrokerConfigurer
in order to provide unimplemented methods.
Also upgrade Gradle build dependencies to Spring
Boot 1.0.0.RC3.
Sebastien Deleuze 11 years ago
parent
commit
be1e8651ae

+ 4 - 4
complete/build.gradle

@@ -4,7 +4,7 @@ buildscript {
         mavenLocal()
         mavenLocal()
     }
     }
     dependencies {
     dependencies {
-        classpath("org.springframework.boot:spring-boot-gradle-plugin:1.0.0.RC1")
+        classpath("org.springframework.boot:spring-boot-gradle-plugin:1.0.0.RC3")
     }
     }
 }
 }
 
 
@@ -24,9 +24,9 @@ repositories {
 }
 }
 
 
 dependencies {
 dependencies {
-    compile("org.springframework.boot:spring-boot-starter-web:1.0.0.RC1")
-    compile("org.springframework.boot:spring-boot-starter-websocket:1.0.0.RC1")
-    compile("org.springframework:spring-messaging:4.0.0.RELEASE")
+    compile("org.springframework.boot:spring-boot-starter-web")
+    compile("org.springframework.boot:spring-boot-starter-websocket")
+    compile("org.springframework:spring-messaging")
     compile("com.fasterxml.jackson.core:jackson-databind")
     compile("com.fasterxml.jackson.core:jackson-databind")
     testCompile("junit:junit:4.11")
     testCompile("junit:junit:4.11")
 }
 }

+ 0 - 1
complete/src/main/java/hello/GreetingController.java

@@ -4,7 +4,6 @@ import org.springframework.messaging.handler.annotation.MessageMapping;
 import org.springframework.messaging.handler.annotation.SendTo;
 import org.springframework.messaging.handler.annotation.SendTo;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
 
 
-
 @Controller
 @Controller
 public class GreetingController {
 public class GreetingController {
 
 

+ 2 - 12
complete/src/main/java/hello/WebSocketConfig.java

@@ -1,16 +1,14 @@
-
 package hello;
 package hello;
 
 
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.messaging.simp.config.ChannelRegistration;
 import org.springframework.messaging.simp.config.MessageBrokerRegistry;
 import org.springframework.messaging.simp.config.MessageBrokerRegistry;
+import org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer;
 import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
 import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
 import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
 import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
-import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
 
 
 @Configuration
 @Configuration
 @EnableWebSocketMessageBroker
 @EnableWebSocketMessageBroker
-public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
+public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer {
 
 
 	@Override
 	@Override
 	public void configureMessageBroker(MessageBrokerRegistry config) {
 	public void configureMessageBroker(MessageBrokerRegistry config) {
@@ -23,12 +21,4 @@ public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
 		registry.addEndpoint("/hello").withSockJS();
 		registry.addEndpoint("/hello").withSockJS();
 	}
 	}
 
 
-	@Override
-	public void configureClientInboundChannel(ChannelRegistration channelRegistration) {
-	}
-
-	@Override
-	public void configureClientOutboundChannel(ChannelRegistration channelRegistration) {
-	}
-
 }
 }

+ 4 - 4
initial/build.gradle

@@ -4,7 +4,7 @@ buildscript {
         mavenLocal()
         mavenLocal()
     }
     }
     dependencies {
     dependencies {
-        classpath("org.springframework.boot:spring-boot-gradle-plugin:1.0.0.RC1")
+        classpath("org.springframework.boot:spring-boot-gradle-plugin:1.0.0.RC3")
     }
     }
 }
 }
 
 
@@ -24,9 +24,9 @@ repositories {
 }
 }
 
 
 dependencies {
 dependencies {
-    compile("org.springframework.boot:spring-boot-starter-web:1.0.0.RC1")
-    compile("org.springframework.boot:spring-boot-starter-websocket:1.0.0.RC1")
-    compile("org.springframework:spring-messaging:4.0.0.RELEASE")
+    compile("org.springframework.boot:spring-boot-starter-web")
+    compile("org.springframework.boot:spring-boot-starter-websocket")
+    compile("org.springframework:spring-messaging")
     compile("com.fasterxml.jackson.core:jackson-databind")
     compile("com.fasterxml.jackson.core:jackson-databind")
     testCompile("junit:junit:4.11")
     testCompile("junit:junit:4.11")
 }
 }