Remove MapReactorSessionRepository default constructor

This commit removes the default `MapReactorSessionRepository` so that the users are required to explicitly supply the `Map` used to store the sessions.
This commit is contained in:
Vedran Pavic
2017-09-10 19:39:46 +02:00
committed by Rob Winch
parent b72c600884
commit 1e46630467
4 changed files with 35 additions and 113 deletions

View File

@@ -16,6 +16,8 @@
package sample;
import java.util.concurrent.ConcurrentHashMap;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.session.EnableSpringWebSession;
@@ -29,7 +31,7 @@ public class HelloWebfluxSessionConfig {
@Bean
public MapReactorSessionRepository reactorSessionRepository() {
return new MapReactorSessionRepository();
return new MapReactorSessionRepository(new ConcurrentHashMap<>());
}
}
// end::class[]