Set maxInactiveIntervalInSeconds to 30 causing (HTTP) Session expiration after 30 seconds.
This commit is contained in:
@@ -21,7 +21,7 @@ import org.springframework.session.data.gemfire.config.annotation.web.http.Enabl
|
||||
|
||||
// tag::class[]
|
||||
@PeerCacheApplication(name = "SpringSessionDataGeodeJavaConfigP2pSample", logLevel = "error") // <1>
|
||||
@EnableGemFireHttpSession // <2>
|
||||
@EnableGemFireHttpSession(maxInactiveIntervalInSeconds = 30) // <2>
|
||||
public class Config {
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:gfe="http://www.springframework.org/schema/gemfire"
|
||||
xmlns:p="http://www.springframework.org/schema/p"
|
||||
xmlns:util="http://www.springframework.org/schema/util"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
@@ -26,7 +27,8 @@
|
||||
<gfe:cache properties-ref="gemfireProperties"/>
|
||||
|
||||
<!--3-->
|
||||
<bean class="org.springframework.session.data.gemfire.config.annotation.web.http.GemFireHttpSessionConfiguration"/>
|
||||
<bean class="org.springframework.session.data.gemfire.config.annotation.web.http.GemFireHttpSessionConfiguration"
|
||||
p:maxInactiveIntervalInSeconds="30"/>
|
||||
<!-- end::beans[] -->
|
||||
|
||||
</beans>
|
||||
|
||||
Reference in New Issue
Block a user