Polish JacksonMongoSessionConverter

Issue gh-416
This commit is contained in:
Rob Winch
2016-03-14 13:27:47 -05:00
parent e23398b890
commit bbbdf939e8
5 changed files with 14 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ import org.springframework.session.Session;
* @author Jakub Kubrynski
* @since 1.2
*/
class JdkMongoSessionConverter extends AbstractMongoSessionConverter {
public class JdkMongoSessionConverter extends AbstractMongoSessionConverter {
private static final Log LOG = LogFactory.getLog(JdkMongoSessionConverter.class);

View File

@@ -19,6 +19,7 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.PostConstruct;
import com.mongodb.DBObject;
@@ -55,7 +56,8 @@ public class MongoOperationsSessionRepository
private final MongoOperations mongoOperations;
private AbstractMongoSessionConverter mongoSessionConverter = SessionConverterProvider.get();
private AbstractMongoSessionConverter mongoSessionConverter = SessionConverterProvider
.getDefaultMongoConverter();
private Integer maxInactiveIntervalInSeconds = DEFAULT_INACTIVE_INTERVAL;
private String collectionName = DEFAULT_COLLECTION_NAME;

View File

@@ -29,7 +29,7 @@ final class SessionConverterProvider {
private SessionConverterProvider() {
}
static AbstractMongoSessionConverter get() {
static AbstractMongoSessionConverter getDefaultMongoConverter() {
if (ClassUtils.isPresent(JACKSON_CLASS_NAME, null)) {
return new JacksonMongoSessionConverter();
}