Fix examples in JavaDocs of classes which use SessionRepositories

The examples in JavaDocs of @EnableSpringHttpSession, SpringHttpSessionConfiguration and @EnableSpringWebSession were creating MapSessionRepository / ReactiveMapSessionRepository
using a constructor, which no longer exists in the classes. This should allow the example
to be used out of the box.
This commit is contained in:
Adam Kucera
2020-02-03 10:13:00 +01:00
committed by Eleftheria Stein-Kousathana
parent f13eb8d73e
commit e7fb9fce47
3 changed files with 3 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ import org.springframework.session.events.SessionDestroyedEvent;
* *
* {@literal @Bean} * {@literal @Bean}
* public MapSessionRepository sessionRepository() { * public MapSessionRepository sessionRepository() {
* return new MapSessionRepository(); * return new MapSessionRepository(new ConcurrentHashMap<>());
* } * }
* *
* } * }

View File

@@ -58,7 +58,7 @@ import org.springframework.util.ObjectUtils;
* *
* {@literal @Bean} * {@literal @Bean}
* public MapSessionRepository sessionRepository() { * public MapSessionRepository sessionRepository() {
* return new MapSessionRepository(); * return new MapSessionRepository(new ConcurrentHashMap<>());
* } * }
* *
* } * }

View File

@@ -36,7 +36,7 @@ import org.springframework.context.annotation.Import;
* *
* {@literal @Bean} * {@literal @Bean}
* public ReactiveSessionRepository sessionRepository() { * public ReactiveSessionRepository sessionRepository() {
* return new ReactiveMapSessionRepository(); * return new ReactiveMapSessionRepository(new ConcurrentHashMap<>());
* } * }
* *
* } * }