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:
@@ -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[]
|
||||
|
||||
Reference in New Issue
Block a user