Prechádzať zdrojové kódy

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 rokov pred
rodič
commit
be1e8651ae

+ 4 - 4
complete/build.gradle

@@ -4,7 +4,7 @@ buildscript {
         mavenLocal()
     }
     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 {
-    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")
     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.stereotype.Controller;
 
-
 @Controller
 public class GreetingController {
 

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

@@ -1,16 +1,14 @@
-
 package hello;
 
 import org.springframework.context.annotation.Configuration;
-import org.springframework.messaging.simp.config.ChannelRegistration;
 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.StompEndpointRegistry;
-import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
 
 @Configuration
 @EnableWebSocketMessageBroker
-public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
+public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer {
 
 	@Override
 	public void configureMessageBroker(MessageBrokerRegistry config) {
@@ -23,12 +21,4 @@ public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
 		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()
     }
     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 {
-    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")
     testCompile("junit:junit:4.11")
 }