Skip to content

Commit

Permalink
change session repository from hazelcast to MapSessionRepository
Browse files Browse the repository at this point in the history
  • Loading branch information
teosarca committed Dec 13, 2017
1 parent 2d2b0e9 commit ef1662a
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 74 deletions.
4 changes: 0 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@
</dependencyManagement>

<dependencies>
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast</artifactId>
</dependency>

<!-- Spring -->
<dependency>
Expand Down

This file was deleted.

41 changes: 41 additions & 0 deletions src/main/java/de/metas/ui/web/session/SessionConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package de.metas.ui.web.session;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.session.ExpiringSession;
import org.springframework.session.MapSessionRepository;
import org.springframework.session.SessionRepository;
import org.springframework.session.config.annotation.web.http.EnableSpringHttpSession;

/*
* #%L
* metasfresh-webui-api
* %%
* Copyright (C) 2017 metas GmbH
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/gpl-2.0.html>.
* #L%
*/

@Configuration
@EnableSpringHttpSession
public class SessionConfig
{
@Bean
SessionRepository<ExpiringSession> inMemorySessionRepository()
{
return new MapSessionRepository();
}
}

0 comments on commit ef1662a

Please sign in to comment.