diff --git a/pom.xml b/pom.xml index a274f68a613ac580783aa3578ca6db05c2f76a97..ccd6a0d596f9507b9cc726e4adcbd6ca8f2f99a2 100644 --- a/pom.xml +++ b/pom.xml @@ -170,13 +170,14 @@ <artifactId>spring-integration-mail</artifactId> </dependency> <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-websocket</artifactId> + <groupId>org.springframework</groupId> + <artifactId>spring-messaging</artifactId> + <scope>compile</scope> </dependency> <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-test</artifactId> - <scope>test</scope> + <groupId>org.springframework</groupId> + <artifactId>spring-websocket</artifactId> + <scope>compile</scope> </dependency> <!-- Security --> <dependency> @@ -244,8 +245,8 @@ <artifactId>javax.mail</artifactId> </dependency> <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-test</artifactId> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-test</artifactId> <scope>test</scope> </dependency> <dependency> @@ -253,6 +254,17 @@ <artifactId>spring-security-test</artifactId> <scope>test</scope> </dependency> + <dependency> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> + <version>3.11.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-test</artifactId> + <scope>test</scope> + </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> diff --git a/src/main/java/de/thm/arsnova/config/WebSocketConfig.java b/src/main/java/de/thm/arsnova/config/WebSocketConfig.java index 7b10e27fe8d674d518ecffb33869b0f6c6619476..c81588390702a23c946c7d4851416b7f428dabbe 100644 --- a/src/main/java/de/thm/arsnova/config/WebSocketConfig.java +++ b/src/main/java/de/thm/arsnova/config/WebSocketConfig.java @@ -20,7 +20,7 @@ public class WebSocketConfig implements WebSocketMessageBrokerConfigurer { @Override public void registerStompEndpoints(StompEndpointRegistry registry) { - registry.addEndpoint("/ws"); + registry.addEndpoint("/ws").setAllowedOrigins("*").withSockJS(); } }