Эх сурвалжийг харах

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 жил өмнө
parent
commit
4db466e4cc

+ 3 - 3
complete/build.gradle

@@ -24,9 +24,9 @@ repositories {
 }
 }
 
 
 dependencies {
 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("org.projectreactor:reactor-tcp:1.0.0.RC1")
     compile("com.fasterxml.jackson.core:jackson-databind")
     compile("com.fasterxml.jackson.core:jackson-databind")
     testCompile("junit:junit:4.11")
     testCompile("junit:junit:4.11")

+ 1 - 1
complete/pom.xml

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

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

@@ -1,24 +1,34 @@
+
 package hello;
 package hello;
 
 
 import org.springframework.context.annotation.Configuration;
 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
 @Configuration
 @EnableWebSocketMessageBroker
 @EnableWebSocketMessageBroker
 public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
 public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
 
 
 	@Override
 	@Override
-	public void configureMessageBroker(MessageBrokerConfigurer config) {
+	public void configureMessageBroker(MessageBrokerRegistry config) {
 		config.enableSimpleBroker("/queue/");
 		config.enableSimpleBroker("/queue/");
-		config.setAnnotationMethodDestinationPrefixes("/app");
+        config.setApplicationDestinationPrefixes("/app");
 	}
 	}
-	
+
 	@Override
 	@Override
 	public void registerStompEndpoints(StompEndpointRegistry registry) {
 	public void registerStompEndpoints(StompEndpointRegistry registry) {
 		registry.addEndpoint("/hello").withSockJS();
 		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 {
 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("org.projectreactor:reactor-tcp:1.0.0.RC1")
     compile("com.fasterxml.jackson.core:jackson-databind")
     compile("com.fasterxml.jackson.core:jackson-databind")
     testCompile("junit:junit:4.11")
     testCompile("junit:junit:4.11")

+ 1 - 1
initial/pom.xml

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