Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
905a77a3a8 | ||
|
|
295f9f78c3 | ||
|
|
04ecc82d09 | ||
|
|
2ddd9e58a3 | ||
|
|
3c52298c47 | ||
|
|
7b385c7d33 | ||
|
|
87d51c54c9 | ||
|
|
210e8eebc5 | ||
|
|
7d52c87173 | ||
|
|
e3c6fb67f2 | ||
|
|
79f187ddd6 | ||
|
|
22f4b0bc9d | ||
|
|
c5ea626d03 | ||
|
|
d067cd1e66 | ||
|
|
76a6be572a |
12
Jenkinsfile
vendored
12
Jenkinsfile
vendored
@@ -56,7 +56,17 @@ try {
|
||||
}
|
||||
|
||||
if(currentBuild.result == 'SUCCESS') {
|
||||
parallel docs: {
|
||||
parallel artifactory: {
|
||||
stage('Artifactory Deploy') {
|
||||
node {
|
||||
checkout scm
|
||||
withCredentials([usernamePassword(credentialsId: '02bd1690-b54f-4c9f-819d-a77cb7a9822c', usernameVariable: 'ARTIFACTORY_USERNAME', passwordVariable: 'ARTIFACTORY_PASSWORD')]) {
|
||||
sh "./gradlew artifactoryPublish -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD --no-daemon --stacktrace"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
docs: {
|
||||
stage('Deploy Docs') {
|
||||
node {
|
||||
checkout scm
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
buildscript {
|
||||
dependencies {
|
||||
classpath 'io.spring.gradle:spring-build-conventions:0.0.1.RELEASE'
|
||||
classpath 'io.spring.gradle:spring-build-conventions:0.0.2.RELEASE'
|
||||
classpath "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion"
|
||||
}
|
||||
repositories {
|
||||
|
||||
@@ -962,19 +962,28 @@ Spring Session is Open Source software released under the http://www.apache.org/
|
||||
|
||||
[[community-extensions]]
|
||||
=== Community Extensions
|
||||
https://github.com/maseev/spring-session-orientdb[Spring Session OrientDB]
|
||||
http://infinispan.org/docs/dev/user_guide/user_guide.html#externalizing_session_using_spring_session[Spring Session Infinispan]
|
||||
|
||||
|===
|
||||
| Name | Location
|
||||
|
||||
| Spring Session OrientDB
|
||||
| https://github.com/maseev/spring-session-orientdb
|
||||
|
||||
| Spring Session Infinispan
|
||||
| http://infinispan.org/docs/dev/user_guide/user_guide.html#externalizing_session_using_spring_session
|
||||
|
||||
|===
|
||||
|
||||
[[minimum-requirements]]
|
||||
== Minimum Requirements
|
||||
|
||||
The minimum requirements for Spring Session are:
|
||||
|
||||
* Java 5+
|
||||
* If you are running in a Servlet Container (not required), Servlet 2.5+
|
||||
* If you are using other Spring libraries (not required), the minimum required version is Spring 3.2.14.
|
||||
While we re-run all unit tests against Spring 3.2.x, we recommend using the latest Spring 4.x version when possible.
|
||||
* Java 8+
|
||||
* If you are running in a Servlet Container (not required), Servlet 3.1+
|
||||
* If you are using other Spring libraries (not required), the minimum required version is Spring 5.0.x.
|
||||
* `@EnableRedisHttpSession` requires Redis 2.8+. This is necessary to support <<api-redisoperationssessionrepository-expiration,Session Expiration>>
|
||||
* `@EnableHazelcastHttpSession` requires Hazelcast 3.6+. This is necessary to support <<api-enablehazelcasthttpsession-storage,`FindByIndexNameSessionRepository`>>
|
||||
|
||||
[NOTE]
|
||||
====
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
springBootVersion=1.5.3.RELEASE
|
||||
version=2.0.0.M1
|
||||
springBootVersion=2.0.0.M1
|
||||
version=2.0.0.M2
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
sonarqube {
|
||||
skipProject = true
|
||||
}
|
||||
@@ -1,177 +1,36 @@
|
||||
dependencyManagement {
|
||||
dependencies {
|
||||
dependency 'biz.paluch.redis:lettuce:4.3.1.Final'
|
||||
dependency 'com.maxmind.geoip2:geoip2:2.3.1'
|
||||
dependency 'edu.umd.cs.mtc:multithreadedtc:1.01'
|
||||
dependency 'org.springframework.shell:spring-shell:1.1.0.RELEASE'
|
||||
dependency 'org.webjars:bootstrap:2.3.2'
|
||||
dependency 'org.webjars:html5shiv:3.7.3'
|
||||
dependency 'org.webjars:knockout:2.3.0'
|
||||
dependency 'org.webjars:sockjs-client:0.3.4'
|
||||
dependency 'org.webjars:stomp-websocket:2.3.0'
|
||||
dependency 'org.webjars:webjars-taglib:0.3'
|
||||
}
|
||||
}
|
||||
|
||||
dependencyManagement {
|
||||
imports {
|
||||
mavenBom 'org.springframework.data:spring-data-releasetrain:Kay-M3'
|
||||
mavenBom 'org.springframework.security:spring-security-bom:5.0.0.M1'
|
||||
mavenBom 'org.springframework:spring-framework-bom:5.0.0.RC1'
|
||||
mavenBom 'org.springframework:spring-framework-bom:5.0.0.RC2'
|
||||
mavenBom 'org.springframework.data:spring-data-releasetrain:Kay-M4'
|
||||
mavenBom 'org.springframework.security:spring-security-bom:5.0.0.M2'
|
||||
}
|
||||
dependencies {
|
||||
dependency 'antlr:antlr:2.7.7'
|
||||
dependency 'aopalliance:aopalliance:1.0'
|
||||
dependency 'biz.paluch.redis:lettuce:4.3.1.Final'
|
||||
dependency 'cglib:cglib-nodep:2.1_3'
|
||||
dependency 'cglib:cglib-nodep:3.2.4'
|
||||
dependency 'ch.qos.logback:logback-classic:1.1.11'
|
||||
dependency 'ch.qos.logback:logback-classic:1.2.3'
|
||||
dependency 'ch.qos.logback:logback-core:1.1.11'
|
||||
dependency 'ch.qos.logback:logback-core:1.2.3'
|
||||
dependency 'com.fasterxml.jackson.core:jackson-annotations:2.8.0'
|
||||
dependency 'com.fasterxml.jackson.core:jackson-annotations:2.9.0.pr3'
|
||||
dependency 'com.fasterxml.jackson.core:jackson-core:2.8.8'
|
||||
dependency 'com.fasterxml.jackson.core:jackson-core:2.9.0.pr3'
|
||||
dependency 'com.fasterxml.jackson.core:jackson-databind:2.8.8'
|
||||
dependency 'com.fasterxml.jackson.core:jackson-databind:2.9.0.pr3'
|
||||
dependency 'com.fasterxml:classmate:1.3.3'
|
||||
dependency 'com.google.code.findbugs:jsr305:3.0.2'
|
||||
dependency 'com.google.code.gson:gson:2.8.0'
|
||||
dependency 'com.google.guava:guava:20.0'
|
||||
dependency 'com.google.http-client:google-http-client:1.20.0'
|
||||
dependency 'com.h2database:h2:1.4.195'
|
||||
dependency 'com.hazelcast:hazelcast-client:3.8'
|
||||
dependency 'com.hazelcast:hazelcast:3.8'
|
||||
dependency 'com.jayway.jsonpath:json-path:2.2.0'
|
||||
dependency 'com.maxmind.db:maxmind-db:1.0.0'
|
||||
dependency 'com.maxmind.geoip2:geoip2:2.3.1'
|
||||
dependency 'com.vaadin.external.google:android-json:0.0.20131108.vaadin1'
|
||||
dependency 'commons-cli:commons-cli:1.3.1'
|
||||
dependency 'commons-codec:commons-codec:1.10'
|
||||
dependency 'commons-collections:commons-collections:3.2.2'
|
||||
dependency 'commons-io:commons-io:2.5'
|
||||
dependency 'dom4j:dom4j:1.6.1'
|
||||
dependency 'edu.umd.cs.mtc:multithreadedtc:1.01'
|
||||
dependency 'io.lettuce:lettuce-core:5.0.0.M2'
|
||||
dependency 'io.netty:netty-buffer:4.1.10.Final'
|
||||
dependency 'io.netty:netty-codec:4.1.10.Final'
|
||||
dependency 'io.netty:netty-common:4.1.10.Final'
|
||||
dependency 'io.netty:netty-handler:4.1.10.Final'
|
||||
dependency 'io.netty:netty-resolver:4.1.10.Final'
|
||||
dependency 'io.netty:netty-transport:4.1.10.Final'
|
||||
dependency 'io.projectreactor:reactor-core:3.1.0.M1'
|
||||
dependency 'io.reactivex:rxjava:1.3.0'
|
||||
dependency 'javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.1'
|
||||
dependency 'javax.servlet.jsp:javax.servlet.jsp-api:2.3.2-b02'
|
||||
dependency 'javax.servlet:javax.servlet-api:3.1.0'
|
||||
dependency 'javax.transaction:javax.transaction-api:1.2'
|
||||
dependency 'javax.validation:validation-api:1.1.0.Final'
|
||||
dependency 'junit:junit:4.12'
|
||||
dependency 'net.bytebuddy:byte-buddy-agent:1.6.11'
|
||||
dependency 'net.bytebuddy:byte-buddy:1.6.12'
|
||||
dependency 'net.java.dev.jna:jna-platform:4.1.0'
|
||||
dependency 'net.java.dev.jna:jna:4.2.2'
|
||||
dependency 'net.minidev:accessors-smart:1.1'
|
||||
dependency 'net.minidev:json-smart:2.2.1'
|
||||
dependency 'net.sourceforge.cssparser:cssparser:0.9.18'
|
||||
dependency 'net.sourceforge.cssparser:cssparser:0.9.22'
|
||||
dependency 'net.sourceforge.htmlunit:htmlunit-core-js:2.17'
|
||||
dependency 'net.sourceforge.htmlunit:htmlunit-core-js:2.26'
|
||||
dependency 'net.sourceforge.htmlunit:htmlunit:2.21'
|
||||
dependency 'net.sourceforge.htmlunit:htmlunit:2.26'
|
||||
dependency 'net.sourceforge.htmlunit:neko-htmlunit:2.21'
|
||||
dependency 'net.sourceforge.htmlunit:neko-htmlunit:2.25'
|
||||
dependency 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:1.4.0'
|
||||
dependency 'ognl:ognl:3.0.8'
|
||||
dependency 'org.akhikhl.gretty:gretty-runner-tomcat8:1.4.2'
|
||||
dependency 'org.akhikhl.gretty:gretty-runner-tomcat:1.4.2'
|
||||
dependency 'org.akhikhl.gretty:gretty-runner:1.4.2'
|
||||
dependency 'org.apache.commons:commons-compress:1.9'
|
||||
dependency 'org.apache.commons:commons-exec:1.3'
|
||||
dependency 'org.apache.commons:commons-lang3:3.5'
|
||||
dependency 'org.apache.commons:commons-pool2:2.4.2'
|
||||
dependency 'org.apache.derby:derby:10.13.1.1'
|
||||
dependency 'org.apache.httpcomponents:httpclient:4.5.3'
|
||||
dependency 'org.apache.httpcomponents:httpcore:4.4.6'
|
||||
dependency 'org.apache.httpcomponents:httpmime:4.5.3'
|
||||
dependency 'org.apache.taglibs:taglibs-standard-impl:1.2.5'
|
||||
dependency 'org.apache.taglibs:taglibs-standard-jstlel:1.2.5'
|
||||
dependency 'org.apache.taglibs:taglibs-standard-spec:1.2.5'
|
||||
dependency 'org.apache.tomcat.embed:tomcat-embed-core:8.5.14'
|
||||
dependency 'org.apache.tomcat.embed:tomcat-embed-el:8.5.14'
|
||||
dependency 'org.apache.tomcat.embed:tomcat-embed-jasper:8.5.14'
|
||||
dependency 'org.apache.tomcat.embed:tomcat-embed-logging-log4j:8.0.33'
|
||||
dependency 'org.apache.tomcat.embed:tomcat-embed-websocket:8.5.14'
|
||||
dependency 'org.apache.tomcat:tomcat-jdbc:8.5.14'
|
||||
dependency 'org.apache.tomcat:tomcat-juli:8.5.14'
|
||||
dependency 'org.aspectj:aspectjweaver:1.8.10'
|
||||
dependency 'org.assertj:assertj-core:3.6.2'
|
||||
dependency 'org.codehaus.groovy:groovy-json:2.4.11'
|
||||
dependency 'org.codehaus.groovy:groovy:2.4.10'
|
||||
dependency 'org.codehaus.groovy:groovy:2.4.11'
|
||||
dependency 'org.eclipse.jdt.core.compiler:ecj:4.6.1'
|
||||
dependency 'org.eclipse.jetty.websocket:websocket-api:9.4.4.v20170414'
|
||||
dependency 'org.eclipse.jetty.websocket:websocket-api:9.4.5.v20170502'
|
||||
dependency 'org.eclipse.jetty.websocket:websocket-client:9.4.4.v20170414'
|
||||
dependency 'org.eclipse.jetty.websocket:websocket-client:9.4.5.v20170502'
|
||||
dependency 'org.eclipse.jetty.websocket:websocket-common:9.4.4.v20170414'
|
||||
dependency 'org.eclipse.jetty.websocket:websocket-common:9.4.5.v20170502'
|
||||
dependency 'org.eclipse.jetty:jetty-client:9.4.4.v20170414'
|
||||
dependency 'org.eclipse.jetty:jetty-client:9.4.5.v20170502'
|
||||
dependency 'org.eclipse.jetty:jetty-http:9.4.4.v20170414'
|
||||
dependency 'org.eclipse.jetty:jetty-http:9.4.5.v20170502'
|
||||
dependency 'org.eclipse.jetty:jetty-io:9.4.4.v20170414'
|
||||
dependency 'org.eclipse.jetty:jetty-io:9.4.5.v20170502'
|
||||
dependency 'org.eclipse.jetty:jetty-util:9.4.4.v20170414'
|
||||
dependency 'org.eclipse.jetty:jetty-util:9.4.5.v20170502'
|
||||
dependency 'org.hamcrest:hamcrest-core:1.3'
|
||||
dependency 'org.hamcrest:hamcrest-library:1.3'
|
||||
dependency 'org.hibernate.common:hibernate-commons-annotations:5.0.1.Final'
|
||||
dependency 'org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final'
|
||||
dependency 'org.hibernate:hibernate-core:5.0.12.Final'
|
||||
dependency 'org.hibernate:hibernate-entitymanager:5.0.12.Final'
|
||||
dependency 'org.hibernate:hibernate-validator:5.3.5.Final'
|
||||
dependency 'org.hsqldb:hsqldb:2.4.0'
|
||||
dependency 'org.javassist:javassist:3.21.0-GA'
|
||||
dependency 'org.jboss.logging:jboss-logging:3.3.1.Final'
|
||||
dependency 'org.jboss:jandex:2.0.0.Final'
|
||||
dependency 'org.mockito:mockito-core:2.7.22'
|
||||
dependency 'org.objenesis:objenesis:2.5.1'
|
||||
dependency 'org.ow2.asm:asm:5.0.3'
|
||||
dependency 'org.reactivestreams:reactive-streams:1.0.0'
|
||||
dependency 'org.seleniumhq.selenium:htmlunit-driver:2.21'
|
||||
dependency 'org.seleniumhq.selenium:htmlunit-driver:2.26'
|
||||
dependency 'org.seleniumhq.selenium:selenium-api:2.53.1'
|
||||
dependency 'org.seleniumhq.selenium:selenium-api:3.3.1'
|
||||
dependency 'org.seleniumhq.selenium:selenium-remote-driver:2.53.1'
|
||||
dependency 'org.seleniumhq.selenium:selenium-remote-driver:3.3.1'
|
||||
dependency 'org.seleniumhq.selenium:selenium-support:2.53.1'
|
||||
dependency 'org.seleniumhq.selenium:selenium-support:3.3.1'
|
||||
dependency 'org.skyscreamer:jsonassert:1.4.0'
|
||||
dependency 'org.slf4j:jcl-over-slf4j:1.7.25'
|
||||
dependency 'org.slf4j:jul-to-slf4j:1.7.25'
|
||||
dependency 'org.slf4j:log4j-over-slf4j:1.7.25'
|
||||
dependency 'org.slf4j:slf4j-api:1.7.25'
|
||||
dependency 'org.thymeleaf:thymeleaf-spring4:2.1.5.RELEASE'
|
||||
dependency 'org.thymeleaf:thymeleaf:2.1.5.RELEASE'
|
||||
dependency 'org.unbescape:unbescape:1.1.0.RELEASE'
|
||||
dependency 'org.w3c.css:sac:1.3'
|
||||
dependency 'org.webjars:bootstrap:2.3.2'
|
||||
dependency 'org.webjars:html5shiv:3.7.3'
|
||||
dependency 'org.webjars:jquery:1.9.0'
|
||||
dependency 'org.webjars:knockout:2.3.0'
|
||||
dependency 'org.webjars:sockjs-client:0.3.4'
|
||||
dependency 'org.webjars:stomp-websocket:2.3.0'
|
||||
dependency 'org.webjars:webjars-locator-core:0.30'
|
||||
dependency 'org.webjars:webjars-locator-core:0.32'
|
||||
dependency 'org.webjars:webjars-locator:0.32-1'
|
||||
dependency 'org.webjars:webjars-taglib:0.3'
|
||||
dependency 'org.yaml:snakeyaml:1.17'
|
||||
dependency 'redis.clients:jedis:2.9.0'
|
||||
dependency 'xalan:serializer:2.7.2'
|
||||
dependency 'xalan:xalan:2.7.2'
|
||||
dependency 'xerces:xercesImpl:2.11.0'
|
||||
dependency 'xml-apis:xml-apis:1.4.01'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
import org.gradle.plugins.ide.eclipse.model.ProjectDependency
|
||||
import org.gradle.plugins.ide.eclipse.model.SourceFolder
|
||||
|
||||
|
||||
apply plugin: "propdeps-eclipse"
|
||||
apply plugin: "propdeps-idea"
|
||||
|
||||
eclipse {
|
||||
jdt {
|
||||
javaRuntimeName = "J2SE-1.5"
|
||||
}
|
||||
}
|
||||
|
||||
eclipse.project.buildCommand "net.sf.eclipsecs.core.CheckstyleBuilder"
|
||||
eclipse.project.natures "net.sf.eclipsecs.core.CheckstyleNature"
|
||||
|
||||
// Include project specific settings
|
||||
task eclipseCheckstyle(type: Copy) {
|
||||
from rootProject.files(
|
||||
"eclipse/.checkstyle")
|
||||
into project.projectDir
|
||||
expand(configDir: rootProject.file('config/checkstyle').absolutePath)
|
||||
}
|
||||
|
||||
task eclipseSettings(type: Copy) {
|
||||
from rootProject.files(
|
||||
"eclipse/org.eclipse.jdt.ui.prefs",
|
||||
"eclipse/org.eclipse.wst.common.project.facet.core.xml")
|
||||
into project.file('.settings/')
|
||||
outputs.upToDateWhen { false }
|
||||
}
|
||||
|
||||
task eclipseWstComponent(type: Copy) {
|
||||
from rootProject.files(
|
||||
"eclipse/org.eclipse.wst.common.component")
|
||||
into project.file('.settings/')
|
||||
expand(deployname: project.name)
|
||||
outputs.upToDateWhen { false }
|
||||
}
|
||||
|
||||
task eclipseJdtPrepare(type: Copy) {
|
||||
from rootProject.file("eclipse/org.eclipse.jdt.core.prefs")
|
||||
into project.file(".settings/")
|
||||
outputs.upToDateWhen { false }
|
||||
}
|
||||
|
||||
task cleanEclipseJdtUi(type: Delete) {
|
||||
delete project.file(".settings/org.eclipse.jdt.core.prefs")
|
||||
delete project.file(".settings/org.eclipse.jdt.ui.prefs")
|
||||
delete project.file(".settings/org.eclipse.wst.common.component")
|
||||
delete project.file(".settings/org.eclipse.wst.common.project.facet.core.xml")
|
||||
}
|
||||
|
||||
task eclipseConfiguration(dependsOn: [eclipseCheckstyle, eclipseJdtPrepare, eclipseSettings, eclipseWstComponent]) {
|
||||
group 'ide'
|
||||
}
|
||||
|
||||
tasks["eclipseJdt"].dependsOn(eclipseJdtPrepare)
|
||||
tasks["cleanEclipse"].dependsOn(cleanEclipseJdtUi)
|
||||
tasks["eclipse"].dependsOn(eclipseConfiguration)
|
||||
@@ -1,92 +0,0 @@
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'groovy'
|
||||
apply plugin: 'javadocHotfix'
|
||||
apply plugin: 'eclipse-wtp'
|
||||
apply plugin: 'propdeps'
|
||||
apply plugin: 'propdeps-idea'
|
||||
apply plugin: 'propdeps-eclipse'
|
||||
apply plugin: 'com.github.ben-manes.versions'
|
||||
apply plugin: 'checkstyle'
|
||||
apply from: IDE_GRADLE
|
||||
|
||||
group = 'org.springframework.session'
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
|
||||
ext.springIoVersion = project.hasProperty('platformVersion') ? platformVersion : 'Cairo-BUILD-SNAPSHOT'
|
||||
|
||||
ext.seleniumDependencies = [
|
||||
"org.seleniumhq.selenium:htmlunit-driver:$htmlUnitVersion",
|
||||
"org.seleniumhq.selenium:selenium-firefox-driver:$seleniumVersion"
|
||||
]
|
||||
|
||||
ext.jstlDependencies = [
|
||||
"javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion",
|
||||
"org.apache.taglibs:taglibs-standard-jstlel:1.2.1"
|
||||
]
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'https://repo.spring.io/libs-snapshot' }
|
||||
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
|
||||
if (details.requested.group == 'org.springframework') {
|
||||
details.useVersion springVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
// Integration test setup
|
||||
configurations {
|
||||
integrationTestCompile {
|
||||
extendsFrom testCompile, optional, provided
|
||||
}
|
||||
integrationTestRuntime {
|
||||
extendsFrom integrationTestCompile, testRuntime
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
integrationTest {
|
||||
java.srcDir file('src/integration-test/java')
|
||||
groovy.srcDirs file('src/integration-test/groovy')
|
||||
resources.srcDir file('src/integration-test/resources')
|
||||
compileClasspath = sourceSets.main.output + sourceSets.test.output + configurations.integrationTestCompile
|
||||
runtimeClasspath = output + compileClasspath + configurations.integrationTestRuntime
|
||||
}
|
||||
}
|
||||
|
||||
task integrationTest(type: Test, dependsOn: jar) {
|
||||
testClassesDir = sourceSets.integrationTest.output.classesDir
|
||||
logging.captureStandardOutput(LogLevel.INFO)
|
||||
classpath = sourceSets.integrationTest.runtimeClasspath
|
||||
maxParallelForks = 1
|
||||
reports {
|
||||
html.destination = project.file("$project.buildDir/reports/integration-tests/")
|
||||
junitXml.destination = project.file("$project.buildDir/integration-test-results/")
|
||||
}
|
||||
}
|
||||
check.dependsOn integrationTest
|
||||
|
||||
checkstyle {
|
||||
configFile = rootProject.file('config/checkstyle/checkstyle.xml')
|
||||
configProperties.configDir = configFile.parentFile
|
||||
toolVersion = '6.16.1'
|
||||
}
|
||||
|
||||
task checkstyle {
|
||||
dependsOn project.tasks.findAll { task -> task.name.matches('checkstyle\\w+') }
|
||||
}
|
||||
|
||||
eclipse {
|
||||
classpath {
|
||||
plusConfigurations += [ configurations.integrationTestCompile ]
|
||||
}
|
||||
}
|
||||
|
||||
project.idea.module {
|
||||
scopes.TEST.plus += [project.configurations.integrationTestRuntime]
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
apply plugin: 'propdeps-maven'
|
||||
|
||||
install {
|
||||
repositories.mavenInstaller {
|
||||
customizePom(pom, project)
|
||||
}
|
||||
}
|
||||
|
||||
def customizePom(pom, gradleProject) {
|
||||
pom.whenConfigured { generatedPom ->
|
||||
|
||||
// sort to make pom dependencies order consistent to ease comparison of older poms
|
||||
generatedPom.dependencies = generatedPom.dependencies.sort { dep ->
|
||||
"$dep.scope:$dep.groupId:$dep.artifactId"
|
||||
}
|
||||
|
||||
// add all items necessary for maven central publication
|
||||
generatedPom.project {
|
||||
name = gradleProject.description
|
||||
description = gradleProject.description
|
||||
url = "https://github.com/spring-projects/spring-session"
|
||||
organization {
|
||||
name = "Spring IO"
|
||||
url = "http://projects.spring.io/spring-session"
|
||||
}
|
||||
licenses {
|
||||
license {
|
||||
name "The Apache Software License, Version 2.0"
|
||||
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
|
||||
distribution "repo"
|
||||
}
|
||||
}
|
||||
scm {
|
||||
url = "https://github.com/spring-projects/spring-session"
|
||||
connection = "scm:git:git://github.com/spring-projects/spring-session"
|
||||
developerConnection = "scm:git:git://github.com/spring-projects/spring-session"
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id = "rwinch"
|
||||
name = "Rob Winch"
|
||||
email = "rwinch@pivotal.io"
|
||||
}
|
||||
}
|
||||
issueManagement {
|
||||
system = "GitHub"
|
||||
url = "https://github.com/spring-projects/spring-session/issues"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
tasks.findByPath("artifactoryPublish")?.enabled = false
|
||||
sonarqube {
|
||||
skipProject = true
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
configurations {
|
||||
spring3TestRuntime.extendsFrom testRuntime
|
||||
}
|
||||
|
||||
configurations.spring3TestRuntime {
|
||||
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
|
||||
if (details.requested.group == 'org.springframework'
|
||||
&& details.requested.name != 'spring-websocket'
|
||||
&& details.requested.name != 'spring-messaging') {
|
||||
details.useVersion '3.2.18.RELEASE'
|
||||
}
|
||||
if (details.requested.group == 'org.springframework.data') {
|
||||
if (details.requested.name == 'spring-data-commons') {
|
||||
details.useVersion '1.12.1.RELEASE'
|
||||
}
|
||||
if (details.requested.name == 'spring-data-keyvalue') {
|
||||
details.useVersion '1.1.1.RELEASE'
|
||||
}
|
||||
if (details.requested.name == 'spring-data-redis') {
|
||||
details.useVersion '1.7.1.RELEASE'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task spring3Test(type: Test) {
|
||||
jvmArgs = ['-ea', '-Xmx500m', '-XX:MaxPermSize=128M']
|
||||
classpath = sourceSets.test.output + sourceSets.main.output + configurations.spring3TestRuntime
|
||||
exclude "org/springframework/session/web/socket/**"
|
||||
reports {
|
||||
html.destination = project.file("$buildDir/spring3-test-results/")
|
||||
junitXml.destination = project.file("$buildDir/reports/spring3-tests/")
|
||||
}
|
||||
}
|
||||
|
||||
//check.dependsOn spring3Test
|
||||
@@ -1,61 +0,0 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
maven { url "https://repo.spring.io/plugins-release" }
|
||||
}
|
||||
dependencies {
|
||||
classpath("com.bmuschko:gradle-tomcat-plugin:2.2.5")
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'war'
|
||||
apply plugin: 'com.bmuschko.tomcat'
|
||||
|
||||
[tomcatRun,tomcatRunWar]*.contextPath = '/'
|
||||
|
||||
|
||||
task integrationTomcatRun(type: com.bmuschko.gradle.tomcat.tasks.TomcatRun) {
|
||||
onlyIf { !sourceSets.integrationTest.allSource.empty }
|
||||
contextPath = tomcatRun.contextPath
|
||||
daemon = true
|
||||
tomcatClasspath = tomcatRun.tomcatClasspath
|
||||
webAppClasspath = tomcatRun.webAppClasspath
|
||||
webAppSourceDirectory = tomcatRun.webAppSourceDirectory
|
||||
doFirst {
|
||||
def mainOutputDir = project.sourceSets.main.output.classesDir
|
||||
if(mainOutputDir) {
|
||||
classesDirectory = mainOutputDir
|
||||
}
|
||||
// delay reserving ports to ensure they are still available
|
||||
def ports = reservePorts(3)
|
||||
httpPort = ports[0]
|
||||
ajpPort = ports[1]
|
||||
stopPort = ports[2]
|
||||
|
||||
System.setProperty('spring.session.redis.namespace',project.name)
|
||||
}
|
||||
}
|
||||
|
||||
task integrationTomcatStop(type: com.bmuschko.gradle.tomcat.tasks.TomcatStop) {
|
||||
onlyIf { !sourceSets.integrationTest.allSource.empty }
|
||||
doFirst {
|
||||
stopPort = integrationTomcatRun.stopPort
|
||||
}
|
||||
}
|
||||
|
||||
integrationTest {
|
||||
dependsOn integrationTomcatRun
|
||||
doFirst {
|
||||
systemProperties['tomcat.port'] = integrationTomcatRun.httpPort
|
||||
}
|
||||
finalizedBy integrationTomcatStop
|
||||
}
|
||||
|
||||
def reservePorts(int count) {
|
||||
def sockets = []
|
||||
for(int i in 1..count) {
|
||||
sockets << new ServerSocket(0)
|
||||
}
|
||||
def result = sockets*.localPort
|
||||
sockets*.close()
|
||||
result
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
apply from: TOMCAT_GRADLE
|
||||
|
||||
dependencies {
|
||||
def tomcatVersion = '6.0.43'
|
||||
tomcat "org.apache.tomcat:catalina:${tomcatVersion}",
|
||||
"org.apache.tomcat:coyote:${tomcatVersion}",
|
||||
"org.apache.tomcat:jasper:${tomcatVersion}"
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
apply from: TOMCAT_GRADLE
|
||||
|
||||
dependencies {
|
||||
def tomcatVersion = '7.0.59'
|
||||
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
|
||||
"org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}",
|
||||
"org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}"
|
||||
}
|
||||
@@ -2,6 +2,7 @@ apply plugin: 'io.spring.convention.spring-sample-boot'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-session-data-redis')
|
||||
compile "org.springframework.boot:spring-boot-starter-web"
|
||||
compile "org.springframework.boot:spring-boot-starter-thymeleaf"
|
||||
compile "org.springframework.boot:spring-boot-starter-security"
|
||||
compile "org.springframework.boot:spring-boot-devtools"
|
||||
|
||||
@@ -18,10 +18,10 @@ package sample.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Configuration
|
||||
public class WebMvcConfig extends WebMvcConfigurerAdapter {
|
||||
public class WebMvcConfig implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addViewControllers(ViewControllerRegistry registry) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorator="layout">
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout}">
|
||||
<head>
|
||||
<title>Secured Content</title>
|
||||
</head>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
|
||||
<head>
|
||||
<title layout:title-pattern="$DECORATOR_TITLE - $CONTENT_TITLE">Spring Session Sample</title>
|
||||
<title layout:title-pattern="$LAYOUT_TITLE - $CONTENT_TITLE">Spring Session Sample</title>
|
||||
<link rel="icon" type="image/x-icon" th:href="@{/favicon.ico}" href="../static/favicon.ico"/>
|
||||
<link th:href="@{/webjars/bootstrap/css/bootstrap.min.css}" href="/webjars/bootstrap/css/bootstrap.min.css" rel="stylesheet"></link>
|
||||
<style type="text/css">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<html xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorator="layout">
|
||||
layout:decorate="~{layout}">
|
||||
<head>
|
||||
<title>Log In</title>
|
||||
</head>
|
||||
@@ -44,4 +44,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
dependencyManagement {
|
||||
dependencies {
|
||||
dependency 'antlr:antlr:2.7.7'
|
||||
dependency 'aopalliance:aopalliance:1.0'
|
||||
dependency 'biz.paluch.redis:lettuce:4.3.1.Final'
|
||||
dependency 'cglib:cglib-nodep:2.1_3'
|
||||
dependency 'ch.qos.logback:logback-classic:1.1.11'
|
||||
dependency 'ch.qos.logback:logback-core:1.1.11'
|
||||
dependency 'com.fasterxml.jackson.core:jackson-annotations:2.8.0'
|
||||
dependency 'com.fasterxml.jackson.core:jackson-core:2.8.8'
|
||||
dependency 'com.fasterxml.jackson.core:jackson-databind:2.8.8'
|
||||
dependency 'com.fasterxml:classmate:1.3.3'
|
||||
dependency 'com.google.code.findbugs:jsr305:3.0.2'
|
||||
dependency 'com.google.code.gson:gson:2.8.0'
|
||||
dependency 'com.google.guava:guava:20.0'
|
||||
dependency 'com.google.http-client:google-http-client:1.20.0'
|
||||
dependency 'com.h2database:h2:1.4.194'
|
||||
dependency 'com.jayway.jsonpath:json-path:2.2.0'
|
||||
dependency 'com.maxmind.db:maxmind-db:1.0.0'
|
||||
dependency 'com.maxmind.geoip2:geoip2:2.3.1'
|
||||
dependency 'com.vaadin.external.google:android-json:0.0.20131108.vaadin1'
|
||||
dependency 'commons-codec:commons-codec:1.10'
|
||||
dependency 'commons-collections:commons-collections:3.2.2'
|
||||
dependency 'commons-io:commons-io:2.5'
|
||||
dependency 'dom4j:dom4j:1.6.1'
|
||||
dependency 'io.netty:netty-buffer:4.1.10.Final'
|
||||
dependency 'io.netty:netty-codec:4.1.10.Final'
|
||||
dependency 'io.netty:netty-common:4.1.10.Final'
|
||||
dependency 'io.netty:netty-handler:4.1.10.Final'
|
||||
dependency 'io.netty:netty-resolver:4.1.10.Final'
|
||||
dependency 'io.netty:netty-transport:4.1.10.Final'
|
||||
dependency 'io.reactivex:rxjava:1.3.0'
|
||||
dependency 'javax.transaction:javax.transaction-api:1.2'
|
||||
dependency 'javax.validation:validation-api:1.1.0.Final'
|
||||
dependency 'junit:junit:4.12'
|
||||
dependency 'net.java.dev.jna:jna-platform:4.1.0'
|
||||
dependency 'net.java.dev.jna:jna:4.2.2'
|
||||
dependency 'net.minidev:accessors-smart:1.1'
|
||||
dependency 'net.minidev:json-smart:2.2.1'
|
||||
dependency 'net.sourceforge.cssparser:cssparser:0.9.18'
|
||||
dependency 'net.sourceforge.htmlunit:htmlunit-core-js:2.17'
|
||||
dependency 'net.sourceforge.htmlunit:htmlunit:2.21'
|
||||
dependency 'net.sourceforge.htmlunit:neko-htmlunit:2.21'
|
||||
dependency 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:1.4.0'
|
||||
dependency 'ognl:ognl:3.0.8'
|
||||
dependency 'org.apache.commons:commons-compress:1.9'
|
||||
dependency 'org.apache.commons:commons-exec:1.3'
|
||||
dependency 'org.apache.commons:commons-lang3:3.5'
|
||||
dependency 'org.apache.commons:commons-pool2:2.4.2'
|
||||
dependency 'org.apache.httpcomponents:httpclient:4.5.3'
|
||||
dependency 'org.apache.httpcomponents:httpcore:4.4.6'
|
||||
dependency 'org.apache.httpcomponents:httpmime:4.5.3'
|
||||
dependency 'org.apache.tomcat.embed:tomcat-embed-core:8.5.14'
|
||||
dependency 'org.apache.tomcat.embed:tomcat-embed-el:8.5.14'
|
||||
dependency 'org.apache.tomcat.embed:tomcat-embed-websocket:8.5.14'
|
||||
dependency 'org.apache.tomcat:tomcat-jdbc:8.5.14'
|
||||
dependency 'org.apache.tomcat:tomcat-juli:8.5.14'
|
||||
dependency 'org.aspectj:aspectjweaver:1.8.10'
|
||||
dependency 'org.assertj:assertj-core:2.6.0'
|
||||
dependency 'org.codehaus.groovy:groovy:2.4.10'
|
||||
dependency 'org.eclipse.jetty.websocket:websocket-api:9.4.4.v20170414'
|
||||
dependency 'org.eclipse.jetty.websocket:websocket-client:9.4.4.v20170414'
|
||||
dependency 'org.eclipse.jetty.websocket:websocket-common:9.4.4.v20170414'
|
||||
dependency 'org.eclipse.jetty:jetty-client:9.4.4.v20170414'
|
||||
dependency 'org.eclipse.jetty:jetty-http:9.4.4.v20170414'
|
||||
dependency 'org.eclipse.jetty:jetty-io:9.4.4.v20170414'
|
||||
dependency 'org.eclipse.jetty:jetty-util:9.4.4.v20170414'
|
||||
dependency 'org.hamcrest:hamcrest-core:1.3'
|
||||
dependency 'org.hamcrest:hamcrest-library:1.3'
|
||||
dependency 'org.hibernate.common:hibernate-commons-annotations:5.0.1.Final'
|
||||
dependency 'org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final'
|
||||
dependency 'org.hibernate:hibernate-core:5.0.12.Final'
|
||||
dependency 'org.hibernate:hibernate-entitymanager:5.0.12.Final'
|
||||
dependency 'org.hibernate:hibernate-validator:5.3.5.Final'
|
||||
dependency 'org.javassist:javassist:3.21.0-GA'
|
||||
dependency 'org.jboss.logging:jboss-logging:3.3.1.Final'
|
||||
dependency 'org.jboss:jandex:2.0.0.Final'
|
||||
dependency 'org.mockito:mockito-core:1.10.19'
|
||||
dependency 'org.objenesis:objenesis:2.5.1'
|
||||
dependency 'org.ow2.asm:asm:5.0.3'
|
||||
dependency 'org.seleniumhq.selenium:htmlunit-driver:2.21'
|
||||
dependency 'org.seleniumhq.selenium:selenium-api:2.53.1'
|
||||
dependency 'org.seleniumhq.selenium:selenium-remote-driver:2.53.1'
|
||||
dependency 'org.seleniumhq.selenium:selenium-support:2.53.1'
|
||||
dependency 'org.skyscreamer:jsonassert:1.4.0'
|
||||
dependency 'org.slf4j:jcl-over-slf4j:1.7.25'
|
||||
dependency 'org.slf4j:jul-to-slf4j:1.7.25'
|
||||
dependency 'org.slf4j:log4j-over-slf4j:1.7.25'
|
||||
dependency 'org.slf4j:slf4j-api:1.7.25'
|
||||
dependency 'org.springframework.boot:spring-boot-autoconfigure:1.5.3.RELEASE'
|
||||
dependency 'org.springframework.boot:spring-boot-starter-aop:1.5.3.RELEASE'
|
||||
dependency 'org.springframework.boot:spring-boot-starter-data-jpa:1.5.3.RELEASE'
|
||||
dependency 'org.springframework.boot:spring-boot-starter-jdbc:1.5.3.RELEASE'
|
||||
dependency 'org.springframework.boot:spring-boot-starter-logging:1.5.3.RELEASE'
|
||||
dependency 'org.springframework.boot:spring-boot-starter-security:1.5.3.RELEASE'
|
||||
dependency 'org.springframework.boot:spring-boot-starter-test:1.5.3.RELEASE'
|
||||
dependency 'org.springframework.boot:spring-boot-starter-thymeleaf:1.5.3.RELEASE'
|
||||
dependency 'org.springframework.boot:spring-boot-starter-tomcat:1.5.3.RELEASE'
|
||||
dependency 'org.springframework.boot:spring-boot-starter-web:1.5.3.RELEASE'
|
||||
dependency 'org.springframework.boot:spring-boot-starter-websocket:1.5.3.RELEASE'
|
||||
dependency 'org.springframework.boot:spring-boot-starter:1.5.3.RELEASE'
|
||||
dependency 'org.springframework.boot:spring-boot-test-autoconfigure:1.5.3.RELEASE'
|
||||
dependency 'org.springframework.boot:spring-boot-test:1.5.3.RELEASE'
|
||||
dependency 'org.springframework.boot:spring-boot:1.5.3.RELEASE'
|
||||
dependency 'org.springframework.data:spring-data-commons:1.13.3.RELEASE'
|
||||
dependency 'org.springframework.data:spring-data-jpa:1.11.3.RELEASE'
|
||||
dependency 'org.springframework.data:spring-data-keyvalue:1.2.3.RELEASE'
|
||||
dependency 'org.springframework.data:spring-data-redis:1.8.3.RELEASE'
|
||||
dependency 'org.springframework.security:spring-security-config:4.2.2.RELEASE'
|
||||
dependency 'org.springframework.security:spring-security-core:4.2.2.RELEASE'
|
||||
dependency 'org.springframework.security:spring-security-data:4.2.2.RELEASE'
|
||||
dependency 'org.springframework.security:spring-security-messaging:4.2.2.RELEASE'
|
||||
dependency 'org.springframework.security:spring-security-test:4.2.2.RELEASE'
|
||||
dependency 'org.springframework.security:spring-security-web:4.2.2.RELEASE'
|
||||
dependency 'org.springframework:spring-aop:4.3.8.RELEASE'
|
||||
dependency 'org.springframework:spring-aspects:4.3.8.RELEASE'
|
||||
dependency 'org.springframework:spring-beans:4.3.8.RELEASE'
|
||||
dependency 'org.springframework:spring-context-support:4.3.8.RELEASE'
|
||||
dependency 'org.springframework:spring-context:4.3.8.RELEASE'
|
||||
dependency 'org.springframework:spring-core:4.3.8.RELEASE'
|
||||
dependency 'org.springframework:spring-expression:4.3.8.RELEASE'
|
||||
dependency 'org.springframework:spring-jcl:5.0.0.RC1'
|
||||
dependency 'org.springframework:spring-jdbc:4.3.8.RELEASE'
|
||||
dependency 'org.springframework:spring-messaging:4.3.8.RELEASE'
|
||||
dependency 'org.springframework:spring-orm:4.3.8.RELEASE'
|
||||
dependency 'org.springframework:spring-oxm:4.3.8.RELEASE'
|
||||
dependency 'org.springframework:spring-test:4.3.8.RELEASE'
|
||||
dependency 'org.springframework:spring-tx:4.3.8.RELEASE'
|
||||
dependency 'org.springframework:spring-web:4.3.8.RELEASE'
|
||||
dependency 'org.springframework:spring-webmvc:4.3.8.RELEASE'
|
||||
dependency 'org.springframework:spring-websocket:4.3.8.RELEASE'
|
||||
dependency 'org.thymeleaf:thymeleaf-spring4:2.1.5.RELEASE'
|
||||
dependency 'org.thymeleaf:thymeleaf:2.1.5.RELEASE'
|
||||
dependency 'org.unbescape:unbescape:1.1.0.RELEASE'
|
||||
dependency 'org.w3c.css:sac:1.3'
|
||||
dependency 'org.webjars:bootstrap:2.3.2'
|
||||
dependency 'org.webjars:html5shiv:3.7.3'
|
||||
dependency 'org.webjars:jquery:1.9.0'
|
||||
dependency 'org.webjars:knockout:2.3.0'
|
||||
dependency 'org.webjars:sockjs-client:0.3.4'
|
||||
dependency 'org.webjars:stomp-websocket:2.3.0'
|
||||
dependency 'org.webjars:webjars-locator-core:0.32'
|
||||
dependency 'org.webjars:webjars-locator:0.32-1'
|
||||
dependency 'org.yaml:snakeyaml:1.17'
|
||||
dependency 'redis.clients:jedis:2.9.0'
|
||||
dependency 'xalan:serializer:2.7.2'
|
||||
dependency 'xalan:xalan:2.7.2'
|
||||
dependency 'xerces:xercesImpl:2.11.0'
|
||||
dependency 'xml-apis:xml-apis:1.4.01'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ apply plugin: 'io.spring.convention.spring-sample-boot'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-session-jdbc')
|
||||
compile "org.springframework.boot:spring-boot-starter-web"
|
||||
compile "org.springframework.boot:spring-boot-starter-thymeleaf"
|
||||
compile "org.springframework.boot:spring-boot-starter-security"
|
||||
compile "org.springframework.boot:spring-boot-devtools"
|
||||
|
||||
@@ -18,10 +18,10 @@ package sample.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Configuration
|
||||
public class WebMvcConfig extends WebMvcConfigurerAdapter {
|
||||
public class WebMvcConfig implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addViewControllers(ViewControllerRegistry registry) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorator="layout">
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout}">
|
||||
<head>
|
||||
<title>Secured Content</title>
|
||||
</head>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
|
||||
<head>
|
||||
<title layout:title-pattern="$DECORATOR_TITLE - $CONTENT_TITLE">Spring Session Sample</title>
|
||||
<title layout:title-pattern="$LAYOUT_TITLE - $CONTENT_TITLE">Spring Session Sample</title>
|
||||
<link rel="icon" type="image/x-icon" th:href="@{/favicon.ico}" href="../static/favicon.ico"/>
|
||||
<link th:href="@{/webjars/bootstrap/css/bootstrap.min.css}" href="/webjars/bootstrap/css/bootstrap.min.css" rel="stylesheet"></link>
|
||||
<style type="text/css">
|
||||
|
||||
@@ -3,8 +3,8 @@ apply plugin: 'io.spring.convention.spring-sample-boot'
|
||||
dependencies {
|
||||
compile(project(':spring-session-data-redis')) {
|
||||
exclude module: 'jedis'
|
||||
exclude module: 'commons-pool2'
|
||||
}
|
||||
compile "org.springframework.boot:spring-boot-starter-web"
|
||||
compile "org.springframework.boot:spring-boot-starter-thymeleaf"
|
||||
compile "org.springframework.boot:spring-boot-starter-security"
|
||||
compile "org.springframework.boot:spring-boot-devtools"
|
||||
@@ -12,7 +12,7 @@ dependencies {
|
||||
compile "org.webjars:bootstrap"
|
||||
compile "org.webjars:html5shiv"
|
||||
compile "org.webjars:webjars-locator"
|
||||
compile "biz.paluch.redis:lettuce"
|
||||
compile "io.lettuce:lettuce-core"
|
||||
compile "org.apache.httpcomponents:httpclient"
|
||||
|
||||
testCompile "org.springframework.boot:spring-boot-starter-test"
|
||||
|
||||
@@ -20,7 +20,6 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.springframework.beans.factory.BeanClassLoaderAware;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
|
||||
import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
|
||||
import org.springframework.data.redis.serializer.RedisSerializer;
|
||||
import org.springframework.security.jackson2.SecurityJackson2Modules;
|
||||
@@ -38,11 +37,6 @@ public class SessionConfig implements BeanClassLoaderAware {
|
||||
return new GenericJackson2JsonRedisSerializer(objectMapper());
|
||||
}
|
||||
|
||||
@Bean
|
||||
public LettuceConnectionFactory connectionFactory() {
|
||||
return new LettuceConnectionFactory();
|
||||
}
|
||||
|
||||
/**
|
||||
* Customized {@link ObjectMapper} to add mix-in for class that doesn't have default
|
||||
* constructors
|
||||
|
||||
@@ -18,10 +18,10 @@ package sample.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Configuration
|
||||
public class WebMvcConfig extends WebMvcConfigurerAdapter {
|
||||
public class WebMvcConfig implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addViewControllers(ViewControllerRegistry registry) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorator="layout">
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout}">
|
||||
<head>
|
||||
<title>Home</title>
|
||||
</head>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
|
||||
<head>
|
||||
<title layout:title-pattern="$DECORATOR_TITLE - $CONTENT_TITLE">Spring Session Sample</title>
|
||||
<title layout:title-pattern="$LAYOUT_TITLE - $CONTENT_TITLE">Spring Session Sample</title>
|
||||
<link rel="icon" type="image/x-icon" th:href="@{/favicon.ico}" href="../static/favicon.ico"/>
|
||||
<link th:href="@{/webjars/bootstrap/css/bootstrap.min.css}" href="/webjars/bootstrap/css/bootstrap.min.css" rel="stylesheet"></link>
|
||||
<style type="text/css">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorator="layout">
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout}">
|
||||
<head>
|
||||
<title>Login</title>
|
||||
</head>
|
||||
|
||||
@@ -2,6 +2,7 @@ apply plugin: 'io.spring.convention.spring-sample-boot'
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-session-data-redis')
|
||||
compile "org.springframework.boot:spring-boot-starter-web"
|
||||
compile "org.springframework.boot:spring-boot-starter-thymeleaf"
|
||||
compile "org.springframework.boot:spring-boot-starter-security"
|
||||
compile "org.springframework.boot:spring-boot-devtools"
|
||||
|
||||
@@ -18,10 +18,10 @@ package sample.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Configuration
|
||||
public class WebMvcConfig extends WebMvcConfigurerAdapter {
|
||||
public class WebMvcConfig implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addViewControllers(ViewControllerRegistry registry) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorator="layout">
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout}">
|
||||
<head>
|
||||
<title>Secured Content</title>
|
||||
</head>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
|
||||
<head>
|
||||
<title layout:title-pattern="$DECORATOR_TITLE - $CONTENT_TITLE">Spring Session Sample</title>
|
||||
<title layout:title-pattern="$LAYOUT_TITLE - $CONTENT_TITLE">Spring Session Sample</title>
|
||||
<link rel="icon" type="image/x-icon" th:href="@{/favicon.ico}" href="../static/favicon.ico"/>
|
||||
<link th:href="@{/webjars/bootstrap/css/bootstrap.min.css}" href="/webjars/bootstrap/css/bootstrap.min.css" rel="stylesheet"></link>
|
||||
<style type="text/css">
|
||||
|
||||
@@ -3,8 +3,8 @@ apply plugin: 'io.spring.convention.spring-sample-boot'
|
||||
dependencies {
|
||||
compile(project(':spring-session-data-redis')) {
|
||||
exclude module: 'jedis'
|
||||
exclude module: 'commons-pool2'
|
||||
}
|
||||
compile "org.springframework.boot:spring-boot-starter-web"
|
||||
compile "org.springframework.boot:spring-boot-starter-thymeleaf"
|
||||
compile "org.springframework.boot:spring-boot-starter-security"
|
||||
compile "org.springframework.boot:spring-boot-starter-data-jpa"
|
||||
@@ -20,7 +20,7 @@ dependencies {
|
||||
compile "org.webjars:sockjs-client"
|
||||
compile "org.webjars:stomp-websocket"
|
||||
compile "org.webjars:webjars-locator"
|
||||
compile "biz.paluch.redis:lettuce"
|
||||
compile "io.lettuce:lettuce-core"
|
||||
compile "com.h2database:h2"
|
||||
|
||||
testCompile "org.springframework.boot:spring-boot-starter-test"
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* Copyright 2014-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package sample.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
|
||||
|
||||
@Configuration
|
||||
public class DataSourceConfig {
|
||||
|
||||
@Bean
|
||||
public LettuceConnectionFactory connectionFactory() {
|
||||
return new LettuceConnectionFactory();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,10 +18,10 @@ package sample.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Configuration
|
||||
public class WebMvcConfig extends WebMvcConfigurerAdapter {
|
||||
public class WebMvcConfig implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addViewControllers(ViewControllerRegistry registry) {
|
||||
|
||||
@@ -18,7 +18,6 @@ package sample.websocket;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import sample.data.ActiveWebSocketUser;
|
||||
import sample.data.ActiveWebSocketUserRepository;
|
||||
|
||||
import org.springframework.context.ApplicationListener;
|
||||
@@ -42,14 +41,10 @@ public class WebSocketDisconnectHandler<S>
|
||||
if (id == null) {
|
||||
return;
|
||||
}
|
||||
ActiveWebSocketUser user = this.repository.findOne(id);
|
||||
if (user == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.repository.delete(id);
|
||||
this.messagingTemplate.convertAndSend("/topic/friends/signout",
|
||||
Arrays.asList(user.getUsername()));
|
||||
|
||||
this.repository.findById(id).ifPresent(user -> {
|
||||
this.repository.deleteById(id);
|
||||
this.messagingTemplate.convertAndSend("/topic/friends/signout",
|
||||
Arrays.asList(user.getUsername()));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorator="layout">
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout}">
|
||||
<head>
|
||||
<title>View All</title>
|
||||
</head>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
|
||||
<head>
|
||||
<title layout:title-pattern="$DECORATOR_TITLE - $CONTENT_TITLE">Spring Session Sample</title>
|
||||
<title layout:title-pattern="$LAYOUT_TITLE - $CONTENT_TITLE">Spring Session Sample</title>
|
||||
<link rel="icon" type="image/x-icon" th:href="@{/favicon.ico}" href="../static/favicon.ico"/>
|
||||
<link th:href="@{/webjars/bootstrap/css/bootstrap.min.css}" href="/webjars/bootstrap/css/bootstrap.min.css" rel="stylesheet"></link>
|
||||
<style type="text/css">
|
||||
|
||||
@@ -21,8 +21,12 @@ import java.util.List;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.SessionCookieConfig;
|
||||
import javax.servlet.http.HttpSessionListener;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
@@ -91,6 +95,8 @@ import org.springframework.util.ObjectUtils;
|
||||
@Configuration
|
||||
public class SpringHttpSessionConfiguration implements ApplicationContextAware {
|
||||
|
||||
private final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
private CookieHttpSessionStrategy defaultHttpSessionStrategy = new CookieHttpSessionStrategy();
|
||||
|
||||
private boolean usesSpringSessionRememberMeServices;
|
||||
@@ -105,15 +111,9 @@ public class SpringHttpSessionConfiguration implements ApplicationContextAware {
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
if (this.cookieSerializer != null) {
|
||||
this.defaultHttpSessionStrategy.setCookieSerializer(this.cookieSerializer);
|
||||
}
|
||||
else if (this.usesSpringSessionRememberMeServices) {
|
||||
DefaultCookieSerializer cookieSerializer = new DefaultCookieSerializer();
|
||||
cookieSerializer.setRememberMeRequestAttribute(
|
||||
SpringSessionRememberMeServices.REMEMBER_ME_LOGIN_ATTR);
|
||||
this.defaultHttpSessionStrategy.setCookieSerializer(cookieSerializer);
|
||||
}
|
||||
CookieSerializer cookieSerializer = this.cookieSerializer != null
|
||||
? this.cookieSerializer : createDefaultCookieSerializer();
|
||||
this.defaultHttpSessionStrategy.setCookieSerializer(cookieSerializer);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@@ -168,4 +168,37 @@ public class SpringHttpSessionConfiguration implements ApplicationContextAware {
|
||||
this.httpSessionListeners = listeners;
|
||||
}
|
||||
|
||||
private CookieSerializer createDefaultCookieSerializer() {
|
||||
DefaultCookieSerializer cookieSerializer = new DefaultCookieSerializer();
|
||||
if (this.servletContext != null) {
|
||||
SessionCookieConfig sessionCookieConfig = null;
|
||||
try {
|
||||
sessionCookieConfig = this.servletContext.getSessionCookieConfig();
|
||||
}
|
||||
catch (UnsupportedOperationException e) {
|
||||
this.logger
|
||||
.warn("Unable to obtain SessionCookieConfig: " + e.getMessage());
|
||||
}
|
||||
if (sessionCookieConfig != null) {
|
||||
if (sessionCookieConfig.getName() != null) {
|
||||
cookieSerializer.setCookieName(sessionCookieConfig.getName());
|
||||
}
|
||||
if (sessionCookieConfig.getDomain() != null) {
|
||||
cookieSerializer.setDomainName(sessionCookieConfig.getDomain());
|
||||
}
|
||||
if (sessionCookieConfig.getPath() != null) {
|
||||
cookieSerializer.setCookiePath(sessionCookieConfig.getPath());
|
||||
}
|
||||
if (sessionCookieConfig.getMaxAge() != -1) {
|
||||
cookieSerializer.setCookieMaxAge(sessionCookieConfig.getMaxAge());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.usesSpringSessionRememberMeServices) {
|
||||
cookieSerializer.setRememberMeRequestAttribute(
|
||||
SpringSessionRememberMeServices.REMEMBER_ME_LOGIN_ATTR);
|
||||
}
|
||||
return cookieSerializer;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -251,18 +251,18 @@ public final class CookieHttpSessionStrategy
|
||||
return sessionIds.values().iterator().next();
|
||||
}
|
||||
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (Map.Entry<String, String> entry : sessionIds.entrySet()) {
|
||||
String alias = entry.getKey();
|
||||
String id = entry.getValue();
|
||||
|
||||
buffer.append(alias);
|
||||
buffer.append(this.serializationDelimiter);
|
||||
buffer.append(id);
|
||||
buffer.append(this.serializationDelimiter);
|
||||
sb.append(alias);
|
||||
sb.append(this.serializationDelimiter);
|
||||
sb.append(id);
|
||||
sb.append(this.serializationDelimiter);
|
||||
}
|
||||
buffer.deleteCharAt(buffer.length() - 1);
|
||||
return buffer.toString();
|
||||
sb.deleteCharAt(sb.length() - 1);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public void onInvalidateSession(HttpServletRequest request,
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
package org.springframework.session.config.annotation.web.http;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
@@ -27,6 +29,7 @@ import org.springframework.beans.factory.UnsatisfiedDependencyException;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.mock.web.MockServletContext;
|
||||
import org.springframework.session.MapSessionRepository;
|
||||
import org.springframework.session.SessionRepository;
|
||||
import org.springframework.session.security.web.authentication.SpringSessionRememberMeServices;
|
||||
@@ -81,24 +84,45 @@ public class SpringHttpSessionConfigurationTests {
|
||||
assertThat(this.context.getBean(SessionRepository.class)).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void sessionCookieConfigConfiguration() {
|
||||
registerAndRefresh(SessionCookieConfigConfiguration.class);
|
||||
|
||||
SessionRepositoryFilter sessionRepositoryFilter = this.context
|
||||
.getBean(SessionRepositoryFilter.class);
|
||||
assertThat(sessionRepositoryFilter).isNotNull();
|
||||
CookieHttpSessionStrategy httpSessionStrategy = (CookieHttpSessionStrategy) ReflectionTestUtils
|
||||
.getField(sessionRepositoryFilter, "httpSessionStrategy");
|
||||
assertThat(httpSessionStrategy).isNotNull();
|
||||
DefaultCookieSerializer cookieSerializer = (DefaultCookieSerializer) ReflectionTestUtils
|
||||
.getField(httpSessionStrategy, "cookieSerializer");
|
||||
assertThat(cookieSerializer).isNotNull();
|
||||
assertThat(ReflectionTestUtils.getField(cookieSerializer, "cookieName"))
|
||||
.isEqualTo("test-name");
|
||||
assertThat(ReflectionTestUtils.getField(cookieSerializer, "cookiePath"))
|
||||
.isEqualTo("test-path");
|
||||
assertThat(ReflectionTestUtils.getField(cookieSerializer, "cookieMaxAge"))
|
||||
.isEqualTo(600);
|
||||
assertThat(ReflectionTestUtils.getField(cookieSerializer, "domainName"))
|
||||
.isEqualTo("test-domain");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void rememberMeServicesConfiguration() {
|
||||
registerAndRefresh(RememberMeServicesConfiguration.class);
|
||||
|
||||
SessionRepositoryFilter sessionRepositoryFilter = this.context.getBean(
|
||||
SessionRepositoryFilter.class);
|
||||
SessionRepositoryFilter sessionRepositoryFilter = this.context
|
||||
.getBean(SessionRepositoryFilter.class);
|
||||
assertThat(sessionRepositoryFilter).isNotNull();
|
||||
CookieHttpSessionStrategy httpSessionStrategy =
|
||||
(CookieHttpSessionStrategy) ReflectionTestUtils.getField(
|
||||
sessionRepositoryFilter, "httpSessionStrategy");
|
||||
CookieHttpSessionStrategy httpSessionStrategy = (CookieHttpSessionStrategy) ReflectionTestUtils
|
||||
.getField(sessionRepositoryFilter, "httpSessionStrategy");
|
||||
assertThat(httpSessionStrategy).isNotNull();
|
||||
DefaultCookieSerializer cookieSerializer =
|
||||
(DefaultCookieSerializer) ReflectionTestUtils.getField(
|
||||
httpSessionStrategy, "cookieSerializer");
|
||||
DefaultCookieSerializer cookieSerializer = (DefaultCookieSerializer) ReflectionTestUtils
|
||||
.getField(httpSessionStrategy, "cookieSerializer");
|
||||
assertThat(cookieSerializer).isNotNull();
|
||||
assertThat(ReflectionTestUtils.getField(
|
||||
cookieSerializer, "rememberMeRequestAttribute"))
|
||||
.isEqualTo(SpringSessionRememberMeServices.REMEMBER_ME_LOGIN_ATTR);
|
||||
assertThat(ReflectionTestUtils.getField(cookieSerializer,
|
||||
"rememberMeRequestAttribute")).isEqualTo(
|
||||
SpringSessionRememberMeServices.REMEMBER_ME_LOGIN_ATTR);
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@@ -120,6 +144,21 @@ public class SpringHttpSessionConfigurationTests {
|
||||
static class DefaultConfiguration extends BaseConfiguration {
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@EnableSpringHttpSession
|
||||
static class SessionCookieConfigConfiguration extends BaseConfiguration {
|
||||
|
||||
@Bean
|
||||
public ServletContext servletContext() {
|
||||
MockServletContext servletContext = new MockServletContext();
|
||||
servletContext.getSessionCookieConfig().setName("test-name");
|
||||
servletContext.getSessionCookieConfig().setDomain("test-domain");
|
||||
servletContext.getSessionCookieConfig().setPath("test-path");
|
||||
servletContext.getSessionCookieConfig().setMaxAge(600);
|
||||
return servletContext;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@EnableSpringHttpSession
|
||||
|
||||
@@ -705,19 +705,19 @@ public class CookieHttpSessionStrategyTests {
|
||||
}
|
||||
|
||||
private String createSessionCookieValue(long size) {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
for (long i = 0; i < size; i++) {
|
||||
String hex = Long.toHexString(i);
|
||||
buffer.append(hex);
|
||||
buffer.append(" ");
|
||||
buffer.append(i);
|
||||
sb.append(hex);
|
||||
sb.append(" ");
|
||||
sb.append(i);
|
||||
if (i < size - 1) {
|
||||
buffer.append(" ");
|
||||
sb.append(" ");
|
||||
}
|
||||
}
|
||||
|
||||
return buffer.toString();
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public void setCookieName(String cookieName) {
|
||||
|
||||
Reference in New Issue
Block a user