Spaces:
Sleeping
Sleeping
Commit
·
307c022
1
Parent(s):
32a0c60
changes
Browse files
src/main/java/ai/giskard/learnspringwebsockets/LearnSpringWebsocketsApplication.java
CHANGED
@@ -48,6 +48,12 @@ public class LearnSpringWebsocketsApplication {
|
|
48 |
return super.getHeader(name);
|
49 |
}
|
50 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
filterChain.doFilter(reqWrapper, response);
|
52 |
}
|
53 |
}
|
|
|
48 |
return super.getHeader(name);
|
49 |
}
|
50 |
};
|
51 |
+
|
52 |
+
System.out.println("HEADERS: " + request.getServletPath());
|
53 |
+
request.getHeaderNames().asIterator().forEachRemaining(s -> {
|
54 |
+
System.out.println("HEADER: " + s + " = " + request.getHeader(s) + " ---> " + reqWrapper.getHeader(s));
|
55 |
+
});
|
56 |
+
|
57 |
filterChain.doFilter(reqWrapper, response);
|
58 |
}
|
59 |
}
|
src/main/java/ai/giskard/learnspringwebsockets/WebSocketBrokerConfig.java
CHANGED
@@ -6,8 +6,8 @@ import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBr
|
|
6 |
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
|
7 |
import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
|
8 |
|
9 |
-
|
10 |
-
|
11 |
public class WebSocketBrokerConfig implements WebSocketMessageBrokerConfigurer {
|
12 |
|
13 |
@Override
|
@@ -15,10 +15,10 @@ public class WebSocketBrokerConfig implements WebSocketMessageBrokerConfigurer {
|
|
15 |
registry.addEndpoint("/ws").setAllowedOrigins("*");
|
16 |
}
|
17 |
|
18 |
-
@Override
|
19 |
-
public void configureMessageBroker(MessageBrokerRegistry config) {
|
20 |
-
|
21 |
-
|
22 |
-
}
|
23 |
|
24 |
}
|
|
|
6 |
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
|
7 |
import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
|
8 |
|
9 |
+
@Configuration
|
10 |
+
@EnableWebSocketMessageBroker
|
11 |
public class WebSocketBrokerConfig implements WebSocketMessageBrokerConfigurer {
|
12 |
|
13 |
@Override
|
|
|
15 |
registry.addEndpoint("/ws").setAllowedOrigins("*");
|
16 |
}
|
17 |
|
18 |
+
// @Override
|
19 |
+
// public void configureMessageBroker(MessageBrokerRegistry config) {
|
20 |
+
// config.setApplicationDestinationPrefixes("/app");
|
21 |
+
// config.enableSimpleBroker("/topic", "/queue");
|
22 |
+
// }
|
23 |
|
24 |
}
|
src/main/java/ai/giskard/learnspringwebsockets/WebSocketConfig.java
CHANGED
@@ -16,8 +16,8 @@ import java.security.Principal;
|
|
16 |
import java.util.List;
|
17 |
import java.util.Map;
|
18 |
|
19 |
-
@Configuration
|
20 |
-
@EnableWebSocket
|
21 |
public class WebSocketConfig implements WebSocketConfigurer {
|
22 |
|
23 |
@Override
|
|
|
16 |
import java.util.List;
|
17 |
import java.util.Map;
|
18 |
|
19 |
+
// @Configuration
|
20 |
+
// @EnableWebSocket
|
21 |
public class WebSocketConfig implements WebSocketConfigurer {
|
22 |
|
23 |
@Override
|