Преглед на файлове

Resolves #3: Upgrade to Tomcat 7.0.47

By using Spring Boot BUILD-SNAPSHOT, was able to get this working properly and use
the correct APIs. Will open parallel issue to migrate back to an official
release instead of simply using snapshots to stabilize after one comes out
with this version of Spring/Tomcat.
Greg Turnquist преди 11 години
родител
ревизия
4db466e4cc
променени са 5 файла, в които са добавени 25 реда и са изтрити 15 реда
  1. 3 3
      complete/build.gradle
  2. 1 1
      complete/pom.xml
  3. 17 7
      complete/src/main/java/hello/WebSocketConfig.java
  4. 3 3
      initial/build.gradle
  5. 1 1
      initial/pom.xml

+ 3 - 3
complete/build.gradle

@@ -24,9 +24,9 @@ repositories {
 }
 
 dependencies {
-    compile("org.springframework.boot:spring-boot-starter-web:0.5.0.M6")
-    compile("org.springframework.boot:spring-boot-starter-websocket:0.5.0.M6")
-    compile("org.springframework:spring-messaging:4.0.0.RC1")
+    compile("org.springframework.boot:spring-boot-starter-web:0.5.0.BUILD-SNAPSHOT")
+    compile("org.springframework.boot:spring-boot-starter-websocket:0.5.0.BUILD-SNAPSHOT")
+    compile("org.springframework:spring-messaging:4.0.0.BUILD-SNAPSHOT")
     compile("org.projectreactor:reactor-tcp:1.0.0.RC1")
     compile("com.fasterxml.jackson.core:jackson-databind")
     testCompile("junit:junit:4.11")

+ 1 - 1
complete/pom.xml

@@ -10,7 +10,7 @@
     <parent>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-parent</artifactId>
-        <version>0.5.0.M6</version>
+        <version>0.5.0.BUILD-SNAPSHOT</version>
     </parent>
 
     <dependencies>

+ 17 - 7
complete/src/main/java/hello/WebSocketConfig.java

@@ -1,24 +1,34 @@
+
 package hello;
 
 import org.springframework.context.annotation.Configuration;
-import org.springframework.messaging.simp.config.EnableWebSocketMessageBroker;
-import org.springframework.messaging.simp.config.MessageBrokerConfigurer;
-import org.springframework.messaging.simp.config.StompEndpointRegistry;
-import org.springframework.messaging.simp.config.WebSocketMessageBrokerConfigurer;
+import org.springframework.messaging.simp.config.ChannelRegistration;
+import org.springframework.messaging.simp.config.MessageBrokerRegistry;
+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 {
 
 	@Override
-	public void configureMessageBroker(MessageBrokerConfigurer config) {
+	public void configureMessageBroker(MessageBrokerRegistry config) {
 		config.enableSimpleBroker("/queue/");
-		config.setAnnotationMethodDestinationPrefixes("/app");
+        config.setApplicationDestinationPrefixes("/app");
 	}
-	
+
 	@Override
 	public void registerStompEndpoints(StompEndpointRegistry registry) {
 		registry.addEndpoint("/hello").withSockJS();
 	}
 
+    @Override
+    public void configureClientInboundChannel(ChannelRegistration channelRegistration) {
+    }
+
+    @Override
+    public void configureClientOutboundChannel(ChannelRegistration channelRegistration) {
+    }
+
 }

+ 3 - 3
initial/build.gradle

@@ -20,9 +20,9 @@ repositories {
 }
 
 dependencies {
-    compile("org.springframework.boot:spring-boot-starter-web:0.5.0.M6")
-    compile("org.springframework.boot:spring-boot-starter-websocket:0.5.0.M6")
-    compile("org.springframework:spring-messaging:4.0.0.RC1")
+    compile("org.springframework.boot:spring-boot-starter-web:0.5.0.BUILD-SNAPSHOT")
+    compile("org.springframework.boot:spring-boot-starter-websocket:0.5.0.BUILD-SNAPSHOT")
+    compile("org.springframework:spring-messaging:4.0.0.BUILD-SNAPSHOT")
     compile("org.projectreactor:reactor-tcp:1.0.0.RC1")
     compile("com.fasterxml.jackson.core:jackson-databind")
     testCompile("junit:junit:4.11")

+ 1 - 1
initial/pom.xml

@@ -10,7 +10,7 @@
     <parent>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-parent</artifactId>
-        <version>0.5.0.M6</version>
+        <version>0.5.0.BUILD-SNAPSHOT</version>
     </parent>
 
     <dependencies>