Skip to content
Snippets Groups Projects
Commit 6ad5b3de authored by Daniel Gerhardt's avatar Daniel Gerhardt
Browse files

Merge branch 'fix-socket-event-handling' into 'master'

Fix registration of Bean for socket event handling

See merge request !70
parents dc06e767 402bf375
Branches
1 merge request!70Fix registration of Bean for socket event handling
Pipeline #9340 passed with stages
in 2 minutes and 35 seconds
......@@ -32,6 +32,7 @@ import de.thm.arsnova.persistance.couchdb.*;
import de.thm.arsnova.persistance.couchdb.InitializingCouchDbConnector;
import de.thm.arsnova.socket.ARSnovaSocket;
import de.thm.arsnova.socket.ARSnovaSocketIOServer;
import de.thm.arsnova.socket.ARSnovaSocketListener;
import de.thm.arsnova.web.CacheControlInterceptorHandler;
import de.thm.arsnova.web.CorsFilter;
import de.thm.arsnova.web.DeprecatedApiInterceptorHandler;
......@@ -270,6 +271,11 @@ public class AppConfig extends WebMvcConfigurerAdapter {
return socketServer;
}
@Bean
public ARSnovaSocketListener arsnovaSocketListener() {
return new ARSnovaSocketListener();
}
@Bean
public CacheManager cacheManager() {
return new ConcurrentMapCacheManager();
......
......@@ -21,13 +21,13 @@ import de.thm.arsnova.events.NovaEvent;
import de.thm.arsnova.events.NovaEventVisitor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Service;
import org.springframework.stereotype.Component;
/**
* An external Listener is required because otherwise the event methods are not called through a Spring proxy.
* This would result in Spring method annotations not working.
*/
@Service
@Component
public class ARSnovaSocketListener implements ApplicationListener<NovaEvent> {
@Autowired
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment