├── .editorconfig ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE.md ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── config.yml │ └── feature_request.md ├── PULL_REQUEST_TEMPLATE.md ├── dco.yml ├── dependabot.yml └── workflows │ ├── continuous-integration-workflow.yml │ ├── dependabot-auto-merge-forward.yml │ ├── deploy-docs.yml │ ├── gradle-wrapper-validation.yml │ ├── merge-dependabot-pr.yml │ ├── pr-build-workflow.yml │ ├── rebuild-search-index.yml │ ├── release-scheduler.yml │ ├── trigger-dependabot-auto-merge-forward.yml │ ├── update-antora-ui-spring.yml │ └── update-scheduled-release-version.yml ├── .gitignore ├── .sdkmanrc ├── CONTRIBUTING.adoc ├── LICENSE.txt ├── README.adoc ├── RELEASE.adoc ├── build.gradle ├── buildSrc ├── build.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── settings.gradle └── src │ ├── main │ ├── graphql │ │ └── org │ │ │ └── springframework │ │ │ └── security │ │ │ └── convention │ │ │ └── versions │ │ │ ├── CreateIssue.graphql │ │ │ ├── FindCreateIssueInput.graphql │ │ │ ├── RateLimit.graphql │ │ │ └── schema.json │ ├── groovy │ │ └── io │ │ │ └── spring │ │ │ └── gradle │ │ │ ├── IncludeRepoTask.groovy │ │ │ └── convention │ │ │ ├── AbstractSpringJavaPlugin.groovy │ │ │ ├── ArtifactoryPlugin.groovy │ │ │ ├── CheckstylePlugin.groovy │ │ │ ├── DependencyManagementExportTask.groovy │ │ │ ├── DeployDocsPlugin.groovy │ │ │ ├── DocsPlugin.groovy │ │ │ ├── IncludeCheckRemotePlugin.groovy │ │ │ ├── IntegrationTestPlugin.groovy │ │ │ ├── JacocoPlugin.groovy │ │ │ ├── JavadocApiPlugin.groovy │ │ │ ├── JavadocOptionsPlugin.groovy │ │ │ ├── ManagementConfigurationPlugin.java │ │ │ ├── MavenBomPlugin.groovy │ │ │ ├── RepositoryConventionPlugin.groovy │ │ │ ├── RootProjectPlugin.groovy │ │ │ ├── SchemaDeployPlugin.groovy │ │ │ ├── SchemaPlugin.groovy │ │ │ ├── SchemaZipPlugin.groovy │ │ │ ├── SortedProperties.groovy │ │ │ ├── SpringDependencyManagementConventionPlugin.groovy │ │ │ ├── SpringModulePlugin.groovy │ │ │ ├── SpringSampleBootPlugin.groovy │ │ │ ├── SpringSamplePlugin.groovy │ │ │ ├── SpringSampleWarPlugin.groovy │ │ │ ├── SpringTestPlugin.groovy │ │ │ ├── TestsConfigurationPlugin.groovy │ │ │ └── Utils.groovy │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── gradle │ │ │ ├── CopyPropertiesPlugin.java │ │ │ ├── antora │ │ │ ├── AntoraVersionPlugin.java │ │ │ ├── AntoraVersionUtils.java │ │ │ ├── CheckAntoraVersionTask.java │ │ │ └── UpdateAntoraVersionTask.java │ │ │ ├── github │ │ │ └── milestones │ │ │ │ ├── GitHubMilestoneApi.java │ │ │ │ ├── GitHubMilestoneHasNoOpenIssuesTask.java │ │ │ │ ├── GitHubMilestonePlugin.java │ │ │ │ ├── Milestone.java │ │ │ │ └── RepositoryRef.java │ │ │ ├── maven │ │ │ ├── MavenPublishingConventionsPlugin.java │ │ │ ├── PublishAllJavaComponentsPlugin.java │ │ │ ├── PublishArtifactsPlugin.java │ │ │ ├── PublishLocalPlugin.java │ │ │ ├── SpringMavenPlugin.java │ │ │ ├── SpringNexusPublishPlugin.java │ │ │ └── SpringSigningPlugin.java │ │ │ ├── propdeps │ │ │ ├── PropDepsEclipsePlugin.groovy │ │ │ ├── PropDepsIdeaPlugin.groovy │ │ │ └── PropDepsPlugin.groovy │ │ │ └── sagan │ │ │ ├── Release.java │ │ │ ├── SaganApi.java │ │ │ ├── SaganCreateReleaseTask.java │ │ │ ├── SaganDeleteReleaseTask.java │ │ │ └── SaganPlugin.java │ └── resources │ │ └── META-INF │ │ └── gradle-plugins │ │ ├── io.spring.convention.artifactory.properties │ │ ├── io.spring.convention.bom.properties │ │ ├── io.spring.convention.checkstyle.properties │ │ ├── io.spring.convention.docs.properties │ │ ├── io.spring.convention.include-check-remote.properties │ │ ├── io.spring.convention.integration-test.properties │ │ ├── io.spring.convention.jacoco.properties │ │ ├── io.spring.convention.javadoc-api.properties │ │ ├── io.spring.convention.javadoc-options.properties │ │ ├── io.spring.convention.repository.properties │ │ ├── io.spring.convention.root.properties │ │ ├── io.spring.convention.spring-module.properties │ │ ├── io.spring.convention.spring-sample-boot.properties │ │ ├── io.spring.convention.spring-sample-war.properties │ │ ├── io.spring.convention.spring-sample.properties │ │ ├── io.spring.convention.spring-test.properties │ │ ├── io.spring.convention.springdependencymangement.properties │ │ └── io.spring.convention.tests-configuration.properties │ └── test │ ├── java │ ├── io │ │ └── spring │ │ │ └── gradle │ │ │ ├── TestKit.java │ │ │ ├── convention │ │ │ ├── IncludeCheckRemotePluginTest.java │ │ │ ├── IntegrationPluginTest.java │ │ │ ├── IntegrationTestPluginITest.java │ │ │ ├── JacocoPluginITest.java │ │ │ ├── JavadocApiPluginITest.java │ │ │ ├── JavadocApiPluginTest.java │ │ │ ├── RepositoryConventionPluginTests.java │ │ │ ├── ShowcaseITest.java │ │ │ ├── SpringMavenPluginITest.java │ │ │ ├── TestsConfigurationPluginITest.java │ │ │ ├── UtilsTest.java │ │ │ └── sagan │ │ │ │ └── SaganApiTests.java │ │ │ └── github │ │ │ └── milestones │ │ │ └── GitHubMilestoneApiTests.java │ └── org │ │ └── springframework │ │ └── gradle │ │ └── github │ │ └── milestones │ │ └── GitHubMilestoneApiTests.java │ └── resources │ ├── samples │ ├── integrationtest │ │ ├── withgroovy │ │ │ ├── build.gradle │ │ │ └── src │ │ │ │ └── integration-test │ │ │ │ └── groovy │ │ │ │ └── sample │ │ │ │ └── TheTest.groovy │ │ ├── withjava │ │ │ ├── build.gradle │ │ │ └── src │ │ │ │ └── integration-test │ │ │ │ └── java │ │ │ │ └── sample │ │ │ │ └── TheTest.java │ │ └── withpropdeps │ │ │ ├── build.gradle │ │ │ └── src │ │ │ └── integration-test │ │ │ └── java │ │ │ └── sample │ │ │ └── TheTest.java │ ├── jacoco │ │ └── java │ │ │ ├── build.gradle │ │ │ └── src │ │ │ ├── main │ │ │ └── java │ │ │ │ └── sample │ │ │ │ └── TheClass.java │ │ │ └── test │ │ │ └── java │ │ │ └── sample │ │ │ └── TheClassTest.java │ ├── javadocapi │ │ └── multimodule │ │ │ ├── api │ │ │ ├── build.gradle │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── java │ │ │ │ └── sample │ │ │ │ └── Api.java │ │ │ ├── build.gradle │ │ │ ├── impl │ │ │ ├── build.gradle │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── java │ │ │ │ └── sample │ │ │ │ └── Impl.java │ │ │ ├── sample │ │ │ ├── build.gradle │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── java │ │ │ │ └── sample │ │ │ │ └── Sample.java │ │ │ └── settings.gradle │ ├── maven │ │ ├── install-with-springio │ │ │ ├── build.gradle │ │ │ └── gradle │ │ │ │ └── dependency-management.gradle │ │ ├── install │ │ │ └── build.gradle │ │ ├── signing │ │ │ ├── build.gradle │ │ │ └── settings.gradle │ │ └── upload │ │ │ └── build.gradle │ ├── showcase │ │ ├── Jenkinsfile │ │ ├── bom │ │ │ └── bom.gradle │ │ ├── build.gradle │ │ ├── etc │ │ │ └── checkstyle │ │ │ │ └── checkstyle.xml │ │ ├── samples │ │ │ └── sgbcs-sample-war │ │ │ │ ├── build.gradle │ │ │ │ └── src │ │ │ │ ├── integration-test │ │ │ │ └── java │ │ │ │ │ └── sample │ │ │ │ │ └── HelloServletTest.java │ │ │ │ └── main │ │ │ │ └── java │ │ │ │ └── sample │ │ │ │ └── HelloServlet.java │ │ ├── settings.gradle │ │ ├── sgbcs-api │ │ │ ├── sgbcs-api.gradle │ │ │ └── src │ │ │ │ ├── main │ │ │ │ └── java │ │ │ │ │ └── api │ │ │ │ │ └── Api.java │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── api │ │ │ │ └── ApiTest.java │ │ ├── sgbcs-core │ │ │ ├── sgbcs-core.gradle │ │ │ └── src │ │ │ │ ├── main │ │ │ │ ├── java │ │ │ │ │ └── core │ │ │ │ │ │ ├── CoreClass.java │ │ │ │ │ │ └── HasOptional.java │ │ │ │ └── resources │ │ │ │ │ ├── META-INF │ │ │ │ │ ├── spring.handlers │ │ │ │ │ └── spring.schemas │ │ │ │ │ └── org │ │ │ │ │ └── springframework │ │ │ │ │ └── springgradlebuildsample │ │ │ │ │ └── config │ │ │ │ │ ├── spring-springgradlebuildsample-2.0.xsd │ │ │ │ │ ├── spring-springgradlebuildsample-2.1.xsd │ │ │ │ │ └── spring-springgradlebuildsample-2.2.xsd │ │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── core │ │ │ │ ├── CoreClassTest.java │ │ │ │ └── HasOptionalTest.java │ │ └── sgbcs-docs │ │ │ ├── sgbcs-docs.gradle │ │ │ └── src │ │ │ ├── docs │ │ │ └── asciidoc │ │ │ │ ├── docinfo.html │ │ │ │ ├── images │ │ │ │ └── sunset.jpg │ │ │ │ ├── index.adoc │ │ │ │ └── subdir │ │ │ │ ├── _b.adoc │ │ │ │ └── _c.adoc │ │ │ └── main │ │ │ └── java │ │ │ └── example │ │ │ └── StringUtils.java │ └── testsconfiguration │ │ ├── build.gradle │ │ ├── core │ │ ├── build.gradle │ │ └── src │ │ │ └── test │ │ │ └── java │ │ │ └── sample │ │ │ └── Dependency.java │ │ ├── settings.gradle │ │ └── web │ │ ├── build.gradle │ │ └── src │ │ └── test │ │ └── java │ │ └── sample │ │ └── DependencyTest.java │ └── test-private.pgp ├── etc ├── checkstyle │ ├── checkstyle.xml │ └── suppressions.xml └── idea │ └── codeStyleConfig.xml ├── git └── hooks │ ├── forward-merge │ └── prepare-forward-merge ├── gradle.properties ├── gradle ├── libs.versions.toml └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── scripts └── release │ ├── release-notes-sections.yml │ └── wait-for-done.sh ├── settings.gradle ├── spring-session-bom └── spring-session-bom.gradle ├── spring-session-core ├── spring-session-core.gradle └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── session │ │ │ ├── DelegatingIndexResolver.java │ │ │ ├── FindByIndexNameSessionRepository.java │ │ │ ├── FlushMode.java │ │ │ ├── IndexResolver.java │ │ │ ├── MapSession.java │ │ │ ├── MapSessionRepository.java │ │ │ ├── PrincipalNameIndexResolver.java │ │ │ ├── ReactiveFindByIndexNameSessionRepository.java │ │ │ ├── ReactiveMapSessionRepository.java │ │ │ ├── ReactiveSessionRepository.java │ │ │ ├── SaveMode.java │ │ │ ├── Session.java │ │ │ ├── SessionIdGenerator.java │ │ │ ├── SessionRepository.java │ │ │ ├── SingleIndexResolver.java │ │ │ ├── UuidSessionIdGenerator.java │ │ │ ├── aot │ │ │ └── hint │ │ │ │ ├── CommonSessionRuntimeHints.java │ │ │ │ ├── CommonSessionSecurityRuntimeHints.java │ │ │ │ ├── server │ │ │ │ └── WebSessionSecurityRuntimeHints.java │ │ │ │ └── servlet │ │ │ │ └── HttpSessionSecurityRuntimeHints.java │ │ │ ├── config │ │ │ ├── ReactiveSessionRepositoryCustomizer.java │ │ │ ├── SessionRepositoryCustomizer.java │ │ │ └── annotation │ │ │ │ └── web │ │ │ │ ├── http │ │ │ │ ├── EnableSpringHttpSession.java │ │ │ │ └── SpringHttpSessionConfiguration.java │ │ │ │ └── server │ │ │ │ ├── EnableSpringWebSession.java │ │ │ │ └── SpringWebSessionConfiguration.java │ │ │ ├── events │ │ │ ├── AbstractSessionEvent.java │ │ │ ├── SessionCreatedEvent.java │ │ │ ├── SessionDeletedEvent.java │ │ │ ├── SessionDestroyedEvent.java │ │ │ └── SessionExpiredEvent.java │ │ │ ├── security │ │ │ ├── SpringSessionBackedReactiveSessionRegistry.java │ │ │ ├── SpringSessionBackedSessionInformation.java │ │ │ ├── SpringSessionBackedSessionRegistry.java │ │ │ └── web │ │ │ │ └── authentication │ │ │ │ └── SpringSessionRememberMeServices.java │ │ │ └── web │ │ │ ├── context │ │ │ └── AbstractHttpSessionApplicationInitializer.java │ │ │ ├── http │ │ │ ├── CompositeHttpSessionIdResolver.java │ │ │ ├── CookieHttpSessionIdResolver.java │ │ │ ├── CookieSerializer.java │ │ │ ├── DefaultCookieSerializer.java │ │ │ ├── HeaderHttpSessionIdResolver.java │ │ │ ├── HttpSessionAdapter.java │ │ │ ├── HttpSessionIdResolver.java │ │ │ ├── OnCommittedResponseWrapper.java │ │ │ ├── OncePerRequestFilter.java │ │ │ ├── SessionEventHttpSessionListenerAdapter.java │ │ │ └── SessionRepositoryFilter.java │ │ │ ├── server │ │ │ └── session │ │ │ │ ├── SpringSessionWebSessionStore.java │ │ │ │ └── package-info.java │ │ │ └── socket │ │ │ ├── config │ │ │ └── annotation │ │ │ │ └── AbstractSessionWebSocketMessageBrokerConfigurer.java │ │ │ ├── events │ │ │ └── SessionConnectEvent.java │ │ │ ├── handler │ │ │ ├── WebSocketConnectHandlerDecoratorFactory.java │ │ │ └── WebSocketRegistryListener.java │ │ │ └── server │ │ │ └── SessionRepositoryMessageInterceptor.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── aot.factories │ └── test │ └── java │ └── org │ └── springframework │ └── session │ ├── DelegatingIndexResolverTests.java │ ├── MapSessionRepositoryTests.java │ ├── MapSessionTests.java │ ├── PrincipalNameIndexResolverTests.java │ ├── ReactiveMapSessionRepositoryTests.java │ ├── aot │ └── hint │ │ ├── CommonSessionRuntimeHintsTests.java │ │ ├── CommonSessionSecurityRuntimeHintsTests.java │ │ ├── server │ │ └── WebSessionSecurityRuntimeHintsTests.java │ │ └── servlet │ │ └── HttpSessionSecurityRuntimeHintsTests.java │ ├── config │ └── annotation │ │ └── web │ │ ├── http │ │ ├── EnableSpringHttpSessionCustomCookieSerializerTests.java │ │ └── SpringHttpSessionConfigurationTests.java │ │ └── server │ │ └── SpringWebSessionConfigurationTests.java │ ├── security │ ├── SpringSessionBackedReactiveSessionRegistryTests.java │ ├── SpringSessionBackedSessionRegistryTests.java │ └── web │ │ └── authentication │ │ └── SpringSessionRememberMeServicesTests.java │ └── web │ ├── http │ ├── CompositeHttpSessionIdResolverTests.java │ ├── CookieHttpSessionIdResolverTests.java │ ├── DefaultCookieSerializerTests.java │ ├── HeaderHttpSessionIdResolverTests.java │ ├── OnCommittedResponseWrapperTests.java │ ├── OncePerRequestFilterAopTests.java │ ├── OncePerRequestFilterTests.java │ ├── SessionEventHttpSessionListenerAdapterTests.java │ └── SessionRepositoryFilterTests.java │ ├── server │ └── session │ │ └── SpringSessionWebSessionStoreTests.java │ └── socket │ ├── handler │ ├── WebSocketConnectHandlerDecoratorFactoryTests.java │ └── WebSocketRegistryListenerTests.java │ └── server │ └── SessionRepositoryMessageInterceptorTests.java ├── spring-session-data-mongodb ├── spring-session-data-mongodb.gradle └── src │ ├── integration-test │ └── java │ │ └── org │ │ └── springframework │ │ └── session │ │ └── data │ │ └── mongo │ │ ├── AbstractClassLoaderTest.java │ │ ├── AbstractITest.java │ │ ├── AbstractMongoRepositoryITest.java │ │ ├── MongoDbDeleteJacksonSessionVerificationTest.java │ │ ├── MongoDbLogoutVerificationTest.java │ │ ├── MongoRepositoryJacksonITest.java │ │ └── MongoRepositoryJdkSerializationITest.java │ ├── main │ └── java │ │ └── org │ │ └── springframework │ │ └── session │ │ └── data │ │ └── mongo │ │ ├── AbstractMongoSessionConverter.java │ │ ├── JacksonMongoSessionConverter.java │ │ ├── JdkMongoSessionConverter.java │ │ ├── MongoIndexedSessionRepository.java │ │ ├── MongoSession.java │ │ ├── MongoSessionUtils.java │ │ ├── ReactiveMongoSessionRepository.java │ │ ├── config │ │ └── annotation │ │ │ └── web │ │ │ ├── http │ │ │ ├── EnableMongoHttpSession.java │ │ │ └── MongoHttpSessionConfiguration.java │ │ │ └── reactive │ │ │ ├── EnableMongoWebSession.java │ │ │ └── ReactiveMongoWebSessionConfiguration.java │ │ └── package-info.java │ └── test │ ├── java │ └── org │ │ └── springframework │ │ └── session │ │ └── data │ │ └── mongo │ │ ├── AbstractMongoSessionConverterTests.java │ │ ├── JacksonMongoSessionConverterTests.java │ │ ├── JdkMongoSessionConverterTests.java │ │ ├── MongoIndexedSessionRepositoryTests.java │ │ ├── MongoSessionTests.java │ │ ├── ReactiveMongoSessionRepositoryTests.java │ │ └── config │ │ └── annotation │ │ └── web │ │ ├── http │ │ └── MongoHttpSessionConfigurationTests.java │ │ └── reactive │ │ └── ReactiveMongoWebSessionConfigurationTests.java │ └── resources │ └── logback.xml ├── spring-session-data-redis ├── spring-session-data-redis.gradle └── src │ ├── integration-test │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── session │ │ │ └── data │ │ │ ├── SessionEventRegistry.java │ │ │ └── redis │ │ │ ├── AbstractRedisITests.java │ │ │ ├── ReactiveRedisIndexedSessionRepositoryConfigurationITests.java │ │ │ ├── ReactiveRedisIndexedSessionRepositoryITests.java │ │ │ ├── ReactiveRedisSessionRepositoryITests.java │ │ │ ├── ReactiveRedisSessionRepositoryKeyMissITests.java │ │ │ ├── RedisIndexedSessionRepositoryDynamicITests.java │ │ │ ├── RedisIndexedSessionRepositoryITests.java │ │ │ ├── RedisSessionRepositoryITests.java │ │ │ ├── RedisSessionRepositoryKeyMissITests.java │ │ │ ├── SortedSetRedisSessionExpirationStoreITests.java │ │ │ ├── config │ │ │ └── annotation │ │ │ │ └── web │ │ │ │ └── http │ │ │ │ └── EnableRedisIndexedHttpSessionExpireSessionDestroyedTests.java │ │ │ ├── flushimmediately │ │ │ └── RedisIndexedSessionRepositoryFlushImmediatelyITests.java │ │ │ └── taskexecutor │ │ │ └── RedisListenerContainerTaskExecutorITests.java │ └── resources │ │ └── testcontainers.properties │ ├── main │ └── java │ │ └── org │ │ └── springframework │ │ └── session │ │ └── data │ │ └── redis │ │ ├── ReactiveRedisIndexedSessionRepository.java │ │ ├── ReactiveRedisSessionIndexer.java │ │ ├── ReactiveRedisSessionRepository.java │ │ ├── RedisIndexedSessionRepository.java │ │ ├── RedisSessionExpirationPolicy.java │ │ ├── RedisSessionExpirationStore.java │ │ ├── RedisSessionMapper.java │ │ ├── RedisSessionRepository.java │ │ ├── SortedSetReactiveRedisSessionExpirationStore.java │ │ ├── SortedSetRedisSessionExpirationStore.java │ │ └── config │ │ ├── ConfigureNotifyKeyspaceEventsAction.java │ │ ├── ConfigureReactiveRedisAction.java │ │ ├── ConfigureRedisAction.java │ │ └── annotation │ │ ├── ConfigureNotifyKeyspaceEventsReactiveAction.java │ │ ├── SpringSessionRedisConnectionFactory.java │ │ ├── SpringSessionRedisOperations.java │ │ └── web │ │ ├── http │ │ ├── AbstractRedisHttpSessionConfiguration.java │ │ ├── EnableRedisHttpSession.java │ │ ├── EnableRedisIndexedHttpSession.java │ │ ├── RedisHttpSessionConfiguration.java │ │ └── RedisIndexedHttpSessionConfiguration.java │ │ └── server │ │ ├── AbstractRedisWebSessionConfiguration.java │ │ ├── EnableRedisIndexedWebSession.java │ │ ├── EnableRedisWebSession.java │ │ ├── RedisIndexedWebSessionConfiguration.java │ │ └── RedisWebSessionConfiguration.java │ └── test │ ├── java │ └── org │ │ └── springframework │ │ └── session │ │ └── data │ │ └── redis │ │ ├── ReactiveRedisSessionIndexerTests.java │ │ ├── ReactiveRedisSessionRepositoryTests.java │ │ ├── RedisIndexedSessionRepositoryTests.java │ │ ├── RedisSessionExpirationPolicyTests.java │ │ ├── RedisSessionMapperTests.java │ │ ├── RedisSessionRepositoryTests.java │ │ ├── SortedSetReactiveRedisSessionExpirationStoreTests.java │ │ ├── SortedSetRedisSessionExpirationStoreTests.java │ │ └── config │ │ └── annotation │ │ └── web │ │ ├── http │ │ ├── EnableRedisKeyspaceNotificationsInitializerTests.java │ │ ├── RedisHttpSessionConfigurationClassPathXmlApplicationContextTests.java │ │ ├── RedisHttpSessionConfigurationOverrideDefaultSerializerTests.java │ │ ├── RedisHttpSessionConfigurationXmlCustomExpireTests.java │ │ ├── RedisHttpSessionConfigurationXmlTests.java │ │ ├── RedisHttpsSessionConfigurationTests.java │ │ ├── RedisIndexedHttpSessionConfigurationMockTests.java │ │ ├── RedisIndexedHttpSessionConfigurationNoOpConfigureRedisActionTests.java │ │ ├── RedisIndexedHttpSessionConfigurationOverrideSessionTaskExecutor.java │ │ ├── RedisIndexedHttpSessionConfigurationOverrideSessionTaskExecutors.java │ │ ├── RedisIndexedHttpSessionConfigurationTests.java │ │ └── gh109 │ │ │ └── Gh109Tests.java │ │ └── server │ │ └── RedisWebSessionConfigurationTests.java │ └── resources │ └── org │ └── springframework │ └── session │ └── data │ └── redis │ └── config │ └── annotation │ └── web │ └── http │ ├── RedisHttpSessionConfigurationClassPathXmlApplicationContextTests-context.xml │ ├── RedisHttpSessionConfigurationXmlCustomExpireTests-context.xml │ └── RedisHttpSessionConfigurationXmlTests-context.xml ├── spring-session-dependencies └── spring-session-dependencies.gradle ├── spring-session-docs ├── antora.yml ├── antora │ └── extensions │ │ ├── major-minor-segment.js │ │ └── version-fix.js ├── cached-antora-playbook.yml ├── modules │ └── ROOT │ │ ├── assets │ │ └── images │ │ │ ├── inmemory-sessions.odg │ │ │ ├── inmemory-sessions.png │ │ │ ├── shared-session-storage.odg │ │ │ └── shared-session-storage.png │ │ ├── examples │ │ ├── java │ │ │ └── docs │ │ │ │ ├── FindByIndexNameSessionRepositoryTests.java │ │ │ │ ├── HttpSessionConfigurationNoOpConfigureRedisActionXmlTests.java │ │ │ │ ├── IndexDocTests.java │ │ │ │ ├── RedisHttpSessionConfigurationNoOpConfigureRedisActionTests.java │ │ │ │ ├── SpringHttpSessionConfig.java │ │ │ │ ├── SpringWebSessionConfig.java │ │ │ │ ├── http │ │ │ │ ├── AbstractHttpSessionListenerTests.java │ │ │ │ ├── HazelcastHttpSessionConfig.java │ │ │ │ ├── HttpSessionListenerJavaConfigTests.java │ │ │ │ ├── HttpSessionListenerXmlTests.java │ │ │ │ └── RedisHttpSessionConfig.java │ │ │ │ ├── security │ │ │ │ ├── RememberMeSecurityConfiguration.java │ │ │ │ ├── RememberMeSecurityConfigurationTests.java │ │ │ │ ├── RememberMeSecurityConfigurationXmlTests.java │ │ │ │ └── SecurityConfiguration.java │ │ │ │ └── websocket │ │ │ │ └── WebSocketConfig.java │ │ ├── resources │ │ │ └── docs │ │ │ │ ├── HttpSessionConfigurationNoOpConfigureRedisActionXmlTests-context.xml │ │ │ │ ├── http │ │ │ │ └── HttpSessionListenerXmlTests-context.xml │ │ │ │ └── security │ │ │ │ ├── RememberMeSecurityConfigurationXmlTests-context.xml │ │ │ │ └── security-config.xml │ │ ├── session-jdbc-main-resources-dir │ │ ├── spring-session-data-mongodb-dir │ │ └── spring-session-samples │ │ ├── nav.adoc │ │ └── pages │ │ ├── api.adoc │ │ ├── configuration │ │ ├── common.adoc │ │ ├── jdbc.adoc │ │ ├── reactive-redis-indexed.adoc │ │ └── redis.adoc │ │ ├── configurations.adoc │ │ ├── guides │ │ ├── boot-findbyusername.adoc │ │ ├── boot-jdbc.adoc │ │ ├── boot-mongo.adoc │ │ ├── boot-redis.adoc │ │ ├── boot-webflux-custom-cookie.adoc │ │ ├── boot-websocket.adoc │ │ ├── docinfo-footer.html │ │ ├── java-custom-cookie.adoc │ │ ├── java-hazelcast.adoc │ │ ├── java-jdbc.adoc │ │ ├── java-redis.adoc │ │ ├── java-rest.adoc │ │ ├── java-security.adoc │ │ ├── xml-jdbc.adoc │ │ └── xml-redis.adoc │ │ ├── http-session.adoc │ │ ├── index.adoc │ │ ├── samples.adoc │ │ ├── spring-security.adoc │ │ ├── upgrading.adoc │ │ ├── web-session.adoc │ │ ├── web-socket.adoc │ │ └── whats-new.adoc └── spring-session-docs.gradle ├── spring-session-hazelcast ├── spring-session-hazelcast.gradle └── src │ ├── integration-test │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── session │ │ │ └── hazelcast │ │ │ ├── AbstractHazelcastIndexedSessionRepositoryITests.java │ │ │ ├── ClientServerHazelcastIndexedSessionRepositoryITests.java │ │ │ ├── EmbeddedHazelcastIndexedSessionRepositoryITests.java │ │ │ ├── FlushImmediateHazelcastIndexedSessionRepositoryITests.java │ │ │ ├── HazelcastITestUtils.java │ │ │ ├── SessionEventHazelcastIndexedSessionRepositoryTests.java │ │ │ └── SessionEventRegistry.java │ └── resources │ │ ├── hazelcast-server.xml │ │ └── testcontainers.properties │ ├── main │ └── java │ │ └── org │ │ └── springframework │ │ └── session │ │ └── hazelcast │ │ ├── HazelcastIndexedSessionRepository.java │ │ ├── HazelcastSessionSerializer.java │ │ ├── PrincipalNameExtractor.java │ │ ├── SessionUpdateEntryProcessor.java │ │ └── config │ │ └── annotation │ │ ├── SpringSessionHazelcastInstance.java │ │ └── web │ │ └── http │ │ ├── EnableHazelcastHttpSession.java │ │ └── HazelcastHttpSessionConfiguration.java │ └── test │ └── java │ └── org │ └── springframework │ └── session │ └── hazelcast │ ├── HazelcastIndexedSessionRepositoryTests.java │ ├── SessionUpdateEntryProcessorTests.java │ └── config │ └── annotation │ └── web │ └── http │ └── HazelcastHttpSessionConfigurationTests.java ├── spring-session-jdbc ├── spring-session-jdbc.gradle └── src │ ├── integration-test │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── session │ │ │ └── jdbc │ │ │ ├── AbstractContainerJdbcIndexedSessionRepositoryITests.java │ │ │ ├── AbstractJdbcIndexedSessionRepositoryITests.java │ │ │ ├── DatabaseContainers.java │ │ │ ├── DatabasePopulators.java │ │ │ ├── Db2JdbcIndexedSessionRepositoryCustomizerITests.java │ │ │ ├── Db2JdbcIndexedSessionRepositoryITests.java │ │ │ ├── DerbyJdbcIndexedSessionRepositoryITests.java │ │ │ ├── H2JdbcIndexedSessionRepositoryITests.java │ │ │ ├── HsqldbJdbcIndexedSessionRepositoryITests.java │ │ │ ├── MariaDbJdbcIndexedSessionRepositoryCustomizerITests.java │ │ │ ├── MariaDbJdbcIndexedSessionRepositoryITests.java │ │ │ ├── MySqlJdbcIndexedSessionRepositoryCustomizerITests.java │ │ │ ├── MySqlJdbcIndexedSessionRepositoryITests.java │ │ │ ├── OracleJdbcIndexedSessionRepositoryCustomizerITests.java │ │ │ ├── OracleJdbcIndexedSessionRepositoryITests.java │ │ │ ├── PostgreSqlJdbcIndexedSessionRepositoryCustomizerITests.java │ │ │ ├── PostgreSqlJdbcIndexedSessionRepositoryITests.java │ │ │ ├── SqlServerJdbcIndexedSessionRepositoryCustomizerITests.java │ │ │ └── SqlServerJdbcIndexedSessionRepositoryITests.java │ └── resources │ │ ├── container-license-acceptance.txt │ │ └── testcontainers.properties │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── session │ │ │ └── jdbc │ │ │ ├── Db2JdbcIndexedSessionRepositoryCustomizer.java │ │ │ ├── JdbcIndexedSessionRepository.java │ │ │ ├── MySqlJdbcIndexedSessionRepositoryCustomizer.java │ │ │ ├── OracleJdbcIndexedSessionRepositoryCustomizer.java │ │ │ ├── PostgreSqlJdbcIndexedSessionRepositoryCustomizer.java │ │ │ ├── SqlServerJdbcIndexedSessionRepositoryCustomizer.java │ │ │ ├── aot │ │ │ └── hint │ │ │ │ └── SessionJdbcRuntimeHints.java │ │ │ ├── config │ │ │ └── annotation │ │ │ │ ├── SpringSessionDataSource.java │ │ │ │ ├── SpringSessionTransactionManager.java │ │ │ │ └── web │ │ │ │ └── http │ │ │ │ ├── EnableJdbcHttpSession.java │ │ │ │ └── JdbcHttpSessionConfiguration.java │ │ │ └── util │ │ │ └── JdbcSchemaUtils.java │ └── resources │ │ ├── META-INF │ │ └── spring │ │ │ └── aot.factories │ │ └── org │ │ └── springframework │ │ └── session │ │ └── jdbc │ │ ├── schema-db2.sql │ │ ├── schema-derby.sql │ │ ├── schema-drop-db2.sql │ │ ├── schema-drop-derby.sql │ │ ├── schema-drop-h2.sql │ │ ├── schema-drop-hsqldb.sql │ │ ├── schema-drop-mysql.sql │ │ ├── schema-drop-oracle.sql │ │ ├── schema-drop-postgresql.sql │ │ ├── schema-drop-sqlite.sql │ │ ├── schema-drop-sqlserver.sql │ │ ├── schema-drop-sybase.sql │ │ ├── schema-h2.sql │ │ ├── schema-hsqldb.sql │ │ ├── schema-mysql.sql │ │ ├── schema-oracle.sql │ │ ├── schema-postgresql.sql │ │ ├── schema-sqlite.sql │ │ ├── schema-sqlserver.sql │ │ └── schema-sybase.sql │ └── test │ └── java │ └── org │ └── springframework │ └── session │ └── jdbc │ ├── FixedSessionIdGenerator.java │ ├── JdbcIndexedSessionRepositoryTests.java │ ├── aot │ └── hint │ │ └── SessionJdbcRuntimeHintsTests.java │ ├── config │ └── annotation │ │ └── web │ │ └── http │ │ └── JdbcHttpSessionConfigurationTests.java │ └── util │ └── JdbcSchemaUtilsTests.java └── spring-session-samples ├── gradle └── dependency-management.gradle ├── spring-session-sample-boot-findbyusername ├── spring-session-sample-boot-findbyusername.gradle └── src │ ├── integration-test │ ├── java │ │ └── sample │ │ │ ├── FindByUsernameTests.java │ │ │ └── pages │ │ │ ├── BasePage.java │ │ │ ├── HomePage.java │ │ │ └── LoginPage.java │ └── resources │ │ └── testcontainers.properties │ ├── main │ ├── java │ │ └── sample │ │ │ ├── FindByUsernameApplication.java │ │ │ ├── config │ │ │ ├── GeoConfig.java │ │ │ ├── SecurityConfig.java │ │ │ └── WebMvcConfig.java │ │ │ ├── mvc │ │ │ ├── IndexController.java │ │ │ └── SecurityControllerAdvise.java │ │ │ └── session │ │ │ ├── SessionDetails.java │ │ │ └── SessionDetailsFilter.java │ └── resources │ │ ├── GeoLite2-City.mmdb │ │ ├── application.properties │ │ ├── static │ │ ├── favicon.ico │ │ └── images │ │ │ └── logo.png │ │ └── templates │ │ ├── index.html │ │ ├── layout.html │ │ └── login.html │ └── test │ └── java │ └── sample │ └── session │ └── SessionDetailsFilterTests.java ├── spring-session-sample-boot-hazelcast ├── spring-session-sample-boot-hazelcast.gradle └── src │ ├── integration-test │ ├── java │ │ └── sample │ │ │ ├── BootTests.java │ │ │ └── pages │ │ │ ├── BasePage.java │ │ │ ├── HomePage.java │ │ │ └── LoginPage.java │ └── resources │ │ └── testcontainers.properties │ └── main │ ├── java │ └── sample │ │ ├── Application.java │ │ └── config │ │ ├── IndexController.java │ │ ├── SecurityConfig.java │ │ ├── SessionConfig.java │ │ └── UserControllerAdvise.java │ └── resources │ ├── application.properties │ ├── static │ ├── favicon.ico │ └── images │ │ └── logo.png │ └── templates │ ├── index.html │ └── layout.html ├── spring-session-sample-boot-jdbc-json-attribute ├── spring-session-sample-boot-jdbc-json-attribute.gradle └── src │ ├── main │ ├── java │ │ └── sample │ │ │ ├── IndexController.java │ │ │ ├── JdbcJsonAttributeApplication.java │ │ │ ├── UserControllerAdvise.java │ │ │ └── config │ │ │ ├── SecurityConfig.java │ │ │ └── SessionConfig.java │ └── resources │ │ ├── application.properties │ │ ├── schema.sql │ │ ├── static │ │ ├── favicon.ico │ │ └── images │ │ │ └── logo.png │ │ └── templates │ │ ├── index.html │ │ └── layout.html │ └── test │ └── java │ └── sample │ ├── JdbcJsonAttributeTestApplication.java │ ├── JdbcJsonAttributeTests.java │ ├── JdbcJsonSpecialCharsAttributeTests.java │ └── TestContainersConfig.java ├── spring-session-sample-boot-jdbc ├── spring-session-sample-boot-jdbc.gradle └── src │ ├── integration-test │ └── java │ │ └── sample │ │ ├── BootTests.java │ │ └── pages │ │ ├── BasePage.java │ │ ├── HomePage.java │ │ └── LoginPage.java │ └── main │ ├── java │ └── sample │ │ ├── Application.java │ │ ├── IndexController.java │ │ ├── UserControllerAdvise.java │ │ └── config │ │ └── SecurityConfig.java │ └── resources │ ├── application.properties │ ├── static │ ├── favicon.ico │ └── images │ │ └── logo.png │ └── templates │ ├── index.html │ └── layout.html ├── spring-session-sample-boot-mongodb-reactive ├── spring-session-sample-boot-mongodb-reactive.gradle └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── session │ │ │ └── mongodb │ │ │ └── examples │ │ │ ├── MongoDbConfig.java │ │ │ ├── SessionAttributeForm.java │ │ │ ├── SessionController.java │ │ │ └── SpringSessionMongoReactiveApplication.java │ └── resources │ │ ├── application.properties │ │ └── templates │ │ └── index.html │ └── test │ └── java │ └── org │ └── springframework │ └── session │ └── mongodb │ └── examples │ ├── AttributeTests.java │ └── pages │ └── HomePage.java ├── spring-session-sample-boot-mongodb-traditional ├── spring-session-sample-boot-mongodb-traditional.gradle └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── session │ │ │ └── mongodb │ │ │ └── examples │ │ │ ├── SpringSessionMongoTraditionalBoot.java │ │ │ ├── config │ │ │ ├── HttpSessionConfig.java │ │ │ └── MongoDbConfig.java │ │ │ └── mvc │ │ │ ├── IndexController.java │ │ │ └── UserControllerAdvise.java │ └── resources │ │ ├── application.properties │ │ ├── static │ │ └── resources │ │ │ └── img │ │ │ ├── favicon.ico │ │ │ └── logo.png │ │ └── templates │ │ ├── index.html │ │ └── layout.html │ └── test │ └── java │ └── org │ └── springframework │ └── session │ └── mongodb │ └── examples │ ├── BootTests.java │ └── pages │ ├── BasePage.java │ ├── HomePage.java │ └── LoginPage.java ├── spring-session-sample-boot-reactive-max-sessions ├── spring-session-sample-boot-reactive-max-sessions.gradle └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── example │ │ │ ├── HelloController.java │ │ │ ├── IndexController.java │ │ │ ├── SecurityConfig.java │ │ │ ├── SessionConfig.java │ │ │ └── SpringSessionSampleBootReactiveMaxSessions.java │ └── resources │ │ ├── application.properties │ │ └── templates │ │ └── index.html │ └── test │ └── java │ └── com │ └── example │ ├── BasePage.java │ ├── HomePage.java │ ├── LoginPage.java │ ├── SpringSessionSampleBootReactiveMaxSessionsTests.java │ ├── TestApplication.java │ └── TestcontainersConfig.java ├── spring-session-sample-boot-reactive-redis-indexed ├── spring-session-sample-boot-reactive-redis-indexed.gradle └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── example │ │ │ ├── IndexController.java │ │ │ ├── SecurityConfig.java │ │ │ ├── SessionConfig.java │ │ │ └── SpringSessionSampleBootReactiveRedisIndexedApplication.java │ └── resources │ │ ├── application.properties │ │ └── templates │ │ └── index.html │ └── test │ └── java │ └── com │ └── example │ ├── BasePage.java │ ├── HomePage.java │ ├── LoginPage.java │ ├── SpringSessionSampleBootReactiveRedisIndexedApplicationTestApplication.java │ ├── SpringSessionSampleBootReactiveRedisIndexedApplicationTests.java │ └── TestcontainersConfig.java ├── spring-session-sample-boot-redis-json ├── spring-session-sample-boot-redis-json.gradle └── src │ ├── integration-test │ ├── java │ │ └── sample │ │ │ ├── HttpRedisJsonTest.java │ │ │ ├── RedisSerializerTest.java │ │ │ └── pages │ │ │ ├── BasePage.java │ │ │ ├── HomePage.java │ │ │ └── LoginPage.java │ └── resources │ │ └── testcontainers.properties │ └── main │ ├── java │ └── sample │ │ ├── Application.java │ │ ├── config │ │ ├── SecurityConfig.java │ │ ├── SessionConfig.java │ │ └── WebMvcConfig.java │ │ └── web │ │ ├── HomeController.java │ │ └── SecurityControllerAdvise.java │ └── resources │ ├── application.properties │ ├── static │ ├── favicon.ico │ └── images │ │ └── logo.png │ └── templates │ ├── home.html │ ├── layout.html │ └── login.html ├── spring-session-sample-boot-redis ├── spring-session-sample-boot-redis.gradle └── src │ ├── integration-test │ ├── java │ │ └── sample │ │ │ ├── BootTests.java │ │ │ └── pages │ │ │ ├── BasePage.java │ │ │ ├── HomePage.java │ │ │ └── LoginPage.java │ └── resources │ │ └── testcontainers.properties │ └── main │ ├── java │ └── sample │ │ ├── Application.java │ │ └── config │ │ ├── IndexController.java │ │ ├── SecurityConfig.java │ │ └── UserControllerAdvise.java │ └── resources │ ├── application.properties │ ├── static │ ├── favicon.ico │ └── images │ │ └── logo.png │ └── templates │ ├── index.html │ └── layout.html ├── spring-session-sample-boot-webflux-custom-cookie ├── spring-session-sample-boot-webflux-custom-cookie.gradle └── src │ ├── integration-test │ ├── java │ │ └── sample │ │ │ ├── AttributeTests.java │ │ │ └── pages │ │ │ └── HomePage.java │ └── resources │ │ └── testcontainers.properties │ └── main │ ├── java │ └── sample │ │ ├── CookieConfig.java │ │ ├── HelloWebFluxApplication.java │ │ ├── SessionAttributeForm.java │ │ └── SessionController.java │ └── resources │ ├── application.properties │ └── templates │ └── home.html ├── spring-session-sample-boot-webflux ├── spring-session-sample-boot-webflux.gradle └── src │ ├── integration-test │ ├── java │ │ └── sample │ │ │ ├── AttributeTests.java │ │ │ └── pages │ │ │ └── HomePage.java │ └── resources │ │ └── testcontainers.properties │ └── main │ ├── java │ └── sample │ │ ├── HelloWebFluxApplication.java │ │ ├── SessionAttributeForm.java │ │ └── SessionController.java │ └── resources │ ├── application.properties │ ├── static │ └── favicon.ico │ └── templates │ └── home.html ├── spring-session-sample-boot-websocket ├── spring-session-sample-boot-websocket.gradle └── src │ ├── integration-test │ ├── java │ │ └── sample │ │ │ └── ApplicationTests.java │ └── resources │ │ └── testcontainers.properties │ └── main │ ├── java │ └── sample │ │ ├── Application.java │ │ ├── config │ │ ├── WebMvcConfig.java │ │ ├── WebSecurityConfig.java │ │ ├── WebSocketConfig.java │ │ ├── WebSocketHandlersConfig.java │ │ └── WebSocketSecurityConfig.java │ │ ├── data │ │ ├── ActiveWebSocketUser.java │ │ ├── ActiveWebSocketUserRepository.java │ │ ├── InstantMessage.java │ │ ├── User.java │ │ └── UserRepository.java │ │ ├── mvc │ │ ├── CsrfController.java │ │ ├── MessageController.java │ │ └── UserControllerAdvise.java │ │ ├── security │ │ ├── CurrentUser.java │ │ └── UserRepositoryUserDetailsService.java │ │ └── websocket │ │ ├── WebSocketConnectHandler.java │ │ └── WebSocketDisconnectHandler.java │ └── resources │ ├── application.properties │ ├── data.sql │ ├── static │ ├── favicon.ico │ ├── images │ │ └── logo.png │ └── js │ │ └── message.js │ └── templates │ ├── index.html │ └── layout.html ├── spring-session-sample-javaconfig-custom-cookie ├── spring-session-sample-javaconfig-custom-cookie.gradle └── src │ ├── integration-test │ └── java │ │ └── sample │ │ ├── AttributeTests.java │ │ └── pages │ │ └── HomePage.java │ └── main │ ├── java │ └── sample │ │ ├── Config.java │ │ ├── EmbeddedRedisConfig.java │ │ ├── Initializer.java │ │ └── SessionServlet.java │ ├── resources │ ├── logback.xml │ └── testcontainers.properties │ └── webapp │ ├── META-INF │ └── MANIFEST.MF │ └── index.jsp ├── spring-session-sample-javaconfig-hazelcast ├── spring-session-sample-javaconfig-hazelcast.gradle └── src │ ├── integration-test │ └── java │ │ └── sample │ │ ├── HazelcastSpringTests.java │ │ └── pages │ │ ├── BasePage.java │ │ ├── HomePage.java │ │ └── LoginPage.java │ └── main │ ├── java │ └── sample │ │ ├── Initializer.java │ │ ├── SecurityConfig.java │ │ ├── SecurityInitializer.java │ │ ├── SessionConfig.java │ │ └── SessionServlet.java │ ├── resources │ └── logback.xml │ └── webapp │ ├── META-INF │ └── MANIFEST.MF │ └── index.jsp ├── spring-session-sample-javaconfig-jdbc ├── spring-session-sample-javaconfig-jdbc.gradle └── src │ ├── integration-test │ └── java │ │ └── sample │ │ ├── AttributeTests.java │ │ └── pages │ │ └── HomePage.java │ └── main │ ├── java │ └── sample │ │ ├── Config.java │ │ ├── Initializer.java │ │ └── SessionServlet.java │ ├── resources │ └── logback.xml │ └── webapp │ ├── META-INF │ └── MANIFEST.MF │ └── index.jsp ├── spring-session-sample-javaconfig-redis ├── spring-session-sample-javaconfig-redis.gradle └── src │ ├── integration-test │ └── java │ │ └── sample │ │ ├── AttributeTests.java │ │ └── pages │ │ └── HomePage.java │ └── main │ ├── java │ └── sample │ │ ├── Config.java │ │ ├── EmbeddedRedisConfig.java │ │ ├── Initializer.java │ │ └── SessionServlet.java │ ├── resources │ ├── logback.xml │ └── testcontainers.properties │ └── webapp │ ├── META-INF │ └── MANIFEST.MF │ └── index.jsp ├── spring-session-sample-javaconfig-rest ├── spring-session-sample-javaconfig-rest.gradle └── src │ ├── integration-test │ └── java │ │ ├── rest │ │ └── RestMockMvcTests.java │ │ └── sample │ │ ├── RestTests.java │ │ └── User.java │ └── main │ ├── java │ └── sample │ │ ├── EmbeddedRedisConfig.java │ │ ├── HttpSessionConfig.java │ │ ├── Initializer.java │ │ ├── SecurityConfig.java │ │ ├── SecurityInitializer.java │ │ └── mvc │ │ ├── MvcConfig.java │ │ ├── MvcInitializer.java │ │ └── RestDemoController.java │ ├── resources │ ├── logback.xml │ └── testcontainers.properties │ └── webapp │ └── META-INF │ └── MANIFEST.MF ├── spring-session-sample-javaconfig-security ├── spring-session-sample-javaconfig-security.gradle └── src │ ├── integration-test │ └── java │ │ └── sample │ │ ├── SecurityTests.java │ │ └── pages │ │ ├── BasePage.java │ │ ├── HomePage.java │ │ └── LoginPage.java │ └── main │ ├── java │ └── sample │ │ ├── Config.java │ │ ├── EmbeddedRedisConfig.java │ │ ├── Initializer.java │ │ ├── SecurityConfig.java │ │ ├── SecurityInitializer.java │ │ └── SessionServlet.java │ ├── resources │ ├── logback.xml │ └── testcontainers.properties │ └── webapp │ ├── META-INF │ └── MANIFEST.MF │ └── index.jsp ├── spring-session-sample-misc-hazelcast ├── spring-session-sample-misc-hazelcast.gradle └── src │ ├── integration-test │ └── java │ │ └── sample │ │ ├── AttributeTests.java │ │ └── pages │ │ └── HomePage.java │ └── main │ ├── java │ └── sample │ │ ├── Initializer.java │ │ └── SessionServlet.java │ ├── resources │ └── logback.xml │ └── webapp │ ├── META-INF │ └── MANIFEST.MF │ └── index.jsp ├── spring-session-sample-xml-jdbc ├── spring-session-sample-xml-jdbc.gradle └── src │ ├── integration-test │ └── java │ │ └── sample │ │ ├── AttributeTests.java │ │ └── pages │ │ └── HomePage.java │ └── main │ ├── java │ └── sample │ │ └── SessionServlet.java │ ├── resources │ └── logback.xml │ └── webapp │ ├── META-INF │ └── MANIFEST.MF │ ├── WEB-INF │ ├── spring │ │ └── session.xml │ └── web.xml │ └── index.jsp └── spring-session-sample-xml-redis ├── spring-session-sample-xml-redis.gradle └── src ├── integration-test └── java │ └── sample │ ├── AttributeTests.java │ └── pages │ └── HomePage.java └── main ├── java └── sample │ ├── EmbeddedRedisConfig.java │ └── SessionServlet.java ├── resources ├── logback.xml └── testcontainers.properties └── webapp ├── META-INF └── MANIFEST.MF ├── WEB-INF ├── spring │ └── session.xml └── web.xml └── index.jsp /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | trim_trailing_whitespace = true 6 | insert_final_newline = true 7 | max_line_length = 120 8 | 9 | [*.java] 10 | indent_style = tab 11 | indent_size = 4 12 | charset = utf-8 13 | continuation_indent_size = 8 14 | 15 | [*.xml] 16 | indent_style = tab 17 | indent_size = 4 18 | charset = utf-8 19 | continuation_indent_size = 8 20 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text eol=lf 2 | *.bat text eol=crlf 3 | *.jar binary 4 | *.jpg binary 5 | *.png binary 6 | *.mmdb binary 7 | *.odg binary 8 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 4 | **Affects:** \ 5 | 6 | --- 7 | 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: 'type: bug, status: waiting-for-triage' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior. 15 | 16 | **Expected behavior** 17 | A clear and concise description of what you expected to happen. 18 | 19 | **Sample** 20 | 21 | A link to a GitHub repository with a [minimal, reproducible sample](https://stackoverflow.com/help/minimal-reproducible-example). 22 | 23 | Reports that include a sample will take priority over reports that do not. 24 | At times, we may require a sample, so it is good to try and include a sample up front. 25 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Community Support 4 | url: https://stackoverflow.com/questions/tagged/spring-session 5 | about: Please ask and answer questions on StackOverflow with the tag spring-session 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: 'status: waiting-for-triage, type: enhancement' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Expected Behavior** 11 | 12 | 13 | 14 | **Current Behavior** 15 | 16 | 17 | 18 | **Context** 19 | 20 | 26 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /.github/dco.yml: -------------------------------------------------------------------------------- 1 | require: 2 | members: false 3 | -------------------------------------------------------------------------------- /.github/workflows/deploy-docs.yml: -------------------------------------------------------------------------------- 1 | name: Deploy Docs 2 | on: 3 | push: 4 | branches-ignore: 5 | - "gh-pages" 6 | - "dependabot/**" 7 | tags: '**' 8 | repository_dispatch: 9 | types: request-build-reference # legacy 10 | #schedule: 11 | #- cron: '0 10 * * *' # Once per day at 10am UTC 12 | workflow_dispatch: 13 | permissions: read-all 14 | jobs: 15 | build: 16 | runs-on: ubuntu-latest 17 | if: github.repository_owner == 'spring-projects' 18 | steps: 19 | - name: Checkout 20 | uses: actions/checkout@v4 21 | with: 22 | ref: docs-build 23 | fetch-depth: 1 24 | - name: Dispatch (partial build) 25 | if: github.ref_type == 'branch' 26 | env: 27 | GH_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} 28 | run: gh workflow run deploy-docs.yml -r $(git rev-parse --abbrev-ref HEAD) -f build-refname=${{ github.ref_name }} 29 | - name: Dispatch (full build) 30 | if: github.ref_type == 'tag' 31 | env: 32 | GH_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} 33 | run: gh workflow run deploy-docs.yml -r $(git rev-parse --abbrev-ref HEAD) 34 | -------------------------------------------------------------------------------- /.github/workflows/gradle-wrapper-validation.yml: -------------------------------------------------------------------------------- 1 | name: "Validate Gradle Wrapper" 2 | on: [push, pull_request] 3 | 4 | jobs: 5 | validation: 6 | name: "Validation" 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v4 10 | - uses: gradle/wrapper-validation-action@v3 11 | -------------------------------------------------------------------------------- /.github/workflows/pr-build-workflow.yml: -------------------------------------------------------------------------------- 1 | name: PR Build 2 | 3 | on: pull_request 4 | 5 | jobs: 6 | build: 7 | name: Build 8 | runs-on: ubuntu-latest 9 | if: github.repository == 'spring-projects/spring-session' 10 | strategy: 11 | matrix: 12 | jdk: [17] 13 | fail-fast: false 14 | steps: 15 | - uses: actions/checkout@v4 16 | - name: Set up JDK ${{ matrix.jdk }} 17 | uses: actions/setup-java@v4 18 | with: 19 | java-version: ${{ matrix.jdk }} 20 | distribution: 'temurin' 21 | cache: 'gradle' 22 | - name: Cache Gradle packages 23 | uses: actions/cache@v4 24 | with: 25 | path: ~/.gradle/caches 26 | key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} 27 | - name: Build with Gradle 28 | run: ./gradlew clean build --no-daemon --stacktrace 29 | -------------------------------------------------------------------------------- /.github/workflows/rebuild-search-index.yml: -------------------------------------------------------------------------------- 1 | name: Rebuild Search Index 2 | on: 3 | schedule: 4 | - cron: '0 10 * * *' # Once per day at 10am UTC 5 | workflow_dispatch: 6 | permissions: read-all 7 | jobs: 8 | build: 9 | if: github.repository_owner == 'spring-projects' 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout 13 | uses: actions/checkout@v4 14 | with: 15 | ref: docs-build 16 | fetch-depth: 1 17 | - name: Dispatch 18 | env: 19 | GH_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} 20 | run: gh workflow run rebuild-search-index.yml -r $(git rev-parse --abbrev-ref HEAD) 21 | -------------------------------------------------------------------------------- /.github/workflows/release-scheduler.yml: -------------------------------------------------------------------------------- 1 | name: Release Scheduler 2 | 3 | on: 4 | schedule: 5 | - cron: '15 13 * * TUE' # Every Tuesday at 13:15pm UTC 6 | workflow_dispatch: 7 | 8 | permissions: read-all 9 | 10 | jobs: 11 | dispatch_scheduled_releases: 12 | name: Dispatch scheduled releases 13 | if: ${{ github.repository_owner == 'spring-projects' }} 14 | strategy: 15 | matrix: 16 | # List of active maintenance branches. 17 | branch: [ main, 3.4.x, 3.3.x ] 18 | runs-on: ubuntu-latest 19 | steps: 20 | - name: Checkout 21 | uses: actions/checkout@v4 22 | with: 23 | fetch-depth: 1 24 | - name: Dispatch 25 | env: 26 | GH_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} 27 | run: gh workflow run update-scheduled-release-version.yml -r ${{ matrix.branch }} 28 | -------------------------------------------------------------------------------- /.github/workflows/trigger-dependabot-auto-merge-forward.yml: -------------------------------------------------------------------------------- 1 | name: Trigger Dependabot Auto Merge Forward 2 | 3 | on: 4 | push: 5 | branches: 6 | - '*.x' 7 | 8 | permissions: read-all 9 | 10 | jobs: 11 | trigger-worflow: 12 | name: Trigger Workflow 13 | runs-on: ubuntu-latest 14 | if: ${{ github.event.commits[0].author.username == 'dependabot[bot]' && github.repository == 'spring-projects/spring-session' }} 15 | steps: 16 | - name: Checkout 17 | id: checkout 18 | uses: actions/checkout@v4 19 | - id: trigger 20 | env: 21 | GH_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} 22 | run: gh workflow run dependabot-auto-merge-forward.yml -r main 23 | -------------------------------------------------------------------------------- /.github/workflows/update-antora-ui-spring.yml: -------------------------------------------------------------------------------- 1 | name: Update Antora UI Spring 2 | 3 | on: 4 | schedule: 5 | - cron: '0 10 * * *' # Once per day at 10am UTC 6 | workflow_dispatch: 7 | 8 | permissions: 9 | pull-requests: write 10 | issues: write 11 | contents: write 12 | 13 | jobs: 14 | update-antora-ui-spring-docs-build: 15 | runs-on: ubuntu-latest 16 | name: Update on docs-build 17 | steps: 18 | - uses: spring-io/spring-doc-actions/update-antora-spring-ui@e28269199d1d27975cf7f65e16d6095c555b3cd0 19 | name: Update 20 | with: 21 | docs-branch: 'docs-build' 22 | token: ${{ secrets.GITHUB_TOKEN }} 23 | -------------------------------------------------------------------------------- /.github/workflows/update-scheduled-release-version.yml: -------------------------------------------------------------------------------- 1 | name: Update Scheduled Release Version 2 | 3 | on: 4 | workflow_dispatch: # Manual trigger only. Triggered by release-scheduler.yml on main. 5 | 6 | jobs: 7 | update-scheduled-release-version: 8 | name: Update Scheduled Release Version 9 | uses: spring-io/spring-security-release-tools/.github/workflows/update-scheduled-release-version.yml@v1 10 | secrets: inherit 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | .idea 3 | build 4 | *.iml 5 | bin 6 | .classpath 7 | .settings 8 | .project 9 | target 10 | out 11 | .springBeans 12 | *.rdb 13 | .checkstyle 14 | !etc/eclipse/.checkstyle 15 | !**/src/**/build 16 | .DS_Store 17 | spring-session-docs/package-lock.json 18 | spring-session-docs/node_modules/ 19 | cached-antora-playbook.yml 20 | -------------------------------------------------------------------------------- /.sdkmanrc: -------------------------------------------------------------------------------- 1 | # Use sdkman to run "sdk env" to initialize with correct JDK version 2 | # Enable auto-env through the sdkman_auto_env config 3 | # See https://sdkman.io/usage#config 4 | # A summary is to add the following to ~/.sdkman/etc/config 5 | # sdkman_auto_env=true 6 | java=17.0.2-tem 7 | -------------------------------------------------------------------------------- /buildSrc/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/buildSrc/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /buildSrc/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /buildSrc/settings.gradle: -------------------------------------------------------------------------------- 1 | dependencyResolutionManagement { 2 | versionCatalogs { 3 | libs { 4 | from(files("../gradle/libs.versions.toml")) 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /buildSrc/src/main/graphql/org/springframework/security/convention/versions/CreateIssue.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateIssueInput($assigneeId: ID!, $labelIds: [ID!], $milestoneId: ID!, $repositoryId: ID!, $title: String!) { 2 | createIssue(input: {assigneeIds: [$assigneeId], labelIds: $labelIds, milestoneId: $milestoneId, projectIds: [], repositoryId: $repositoryId, title: $title}) { 3 | issue { 4 | number 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /buildSrc/src/main/graphql/org/springframework/security/convention/versions/FindCreateIssueInput.graphql: -------------------------------------------------------------------------------- 1 | query FindCreateIssueInput($owner: String!, $name: String!, $labelQuery: String, $milestoneName: String) { 2 | repository(owner: $owner, name: $name) { 3 | id 4 | labels(query: $labelQuery, first: 1) { 5 | nodes { 6 | id 7 | name 8 | } 9 | } 10 | milestones(query: $milestoneName, states: [OPEN], first: 1) { 11 | nodes { 12 | id 13 | title 14 | } 15 | } 16 | } 17 | viewer { 18 | id 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /buildSrc/src/main/graphql/org/springframework/security/convention/versions/RateLimit.graphql: -------------------------------------------------------------------------------- 1 | query RateLimit { 2 | rateLimit { 3 | limit 4 | cost 5 | remaining 6 | resetAt 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /buildSrc/src/main/groovy/io/spring/gradle/convention/JavadocOptionsPlugin.groovy: -------------------------------------------------------------------------------- 1 | package io.spring.gradle.convention 2 | 3 | import org.gradle.api.Plugin 4 | import org.gradle.api.Project 5 | import org.gradle.api.tasks.javadoc.Javadoc 6 | 7 | public class JavadocOptionsPlugin implements Plugin { 8 | 9 | @Override 10 | public void apply(Project project) { 11 | project.getTasks().withType(Javadoc).all { t-> 12 | t.options.addStringOption('Xdoclint:none', '-quiet') 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /buildSrc/src/main/groovy/io/spring/gradle/convention/MavenBomPlugin.groovy: -------------------------------------------------------------------------------- 1 | package io.spring.gradle.convention 2 | 3 | import org.gradle.api.Plugin 4 | import org.gradle.api.Project 5 | import org.gradle.api.plugins.JavaPlatformPlugin 6 | import org.sonarqube.gradle.SonarQubePlugin 7 | import org.springframework.gradle.CopyPropertiesPlugin 8 | import org.springframework.gradle.maven.SpringMavenPlugin 9 | 10 | public class MavenBomPlugin implements Plugin { 11 | static String MAVEN_BOM_TASK_NAME = "mavenBom" 12 | 13 | public void apply(Project project) { 14 | project.plugins.apply(JavaPlatformPlugin) 15 | project.plugins.apply(SpringMavenPlugin) 16 | project.plugins.apply(CopyPropertiesPlugin) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /buildSrc/src/main/groovy/io/spring/gradle/convention/SchemaPlugin.groovy: -------------------------------------------------------------------------------- 1 | package io.spring.gradle.convention 2 | 3 | import org.gradle.api.plugins.JavaPlugin 4 | import org.gradle.api.tasks.bundling.Zip 5 | import org.gradle.api.Plugin 6 | import org.gradle.api.Project 7 | 8 | public class SchemaPlugin implements Plugin { 9 | 10 | @Override 11 | public void apply(Project project) { 12 | project.getPluginManager().apply(SchemaZipPlugin) 13 | project.getPluginManager().apply(SchemaDeployPlugin) 14 | } 15 | } -------------------------------------------------------------------------------- /buildSrc/src/main/groovy/io/spring/gradle/convention/SpringTestPlugin.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2016 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package io.spring.gradle.convention; 18 | 19 | import org.gradle.api.Project; 20 | 21 | /** 22 | * @author Rob Winch 23 | */ 24 | public class SpringTestPlugin extends AbstractSpringJavaPlugin { 25 | 26 | @Override 27 | public void additionalPlugins(Project project) { 28 | project.sonarqube.skipProject = true 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /buildSrc/src/main/java/org/springframework/gradle/github/milestones/Milestone.java: -------------------------------------------------------------------------------- 1 | package org.springframework.gradle.github.milestones; 2 | 3 | public class Milestone { 4 | private String title; 5 | 6 | private long number; 7 | 8 | public String getTitle() { 9 | return title; 10 | } 11 | 12 | public void setTitle(String title) { 13 | this.title = title; 14 | } 15 | 16 | public long getNumber() { 17 | return number; 18 | } 19 | 20 | public void setNumber(long number) { 21 | this.number = number; 22 | } 23 | 24 | @Override 25 | public String toString() { 26 | return "Milestone{" + 27 | "title='" + title + '\'' + 28 | ", number=" + number + 29 | '}'; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /buildSrc/src/main/java/org/springframework/gradle/maven/PublishArtifactsPlugin.java: -------------------------------------------------------------------------------- 1 | package org.springframework.gradle.maven; 2 | 3 | import io.spring.gradle.convention.Utils; 4 | import org.gradle.api.Action; 5 | import org.gradle.api.Plugin; 6 | import org.gradle.api.Project; 7 | import org.gradle.api.Task; 8 | 9 | public class PublishArtifactsPlugin implements Plugin { 10 | @Override 11 | public void apply(Project project) { 12 | project.getTasks().register("publishArtifacts", new Action() { 13 | @Override 14 | public void execute(Task publishArtifacts) { 15 | publishArtifacts.setGroup("Publishing"); 16 | publishArtifacts.setDescription("Publish the artifacts to either Artifactory or Maven Central based on the version"); 17 | if (Utils.isRelease(project)) { 18 | publishArtifacts.dependsOn("publishToOssrh"); 19 | } 20 | else { 21 | publishArtifacts.dependsOn("artifactoryPublish"); 22 | } 23 | } 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /buildSrc/src/main/java/org/springframework/gradle/maven/PublishLocalPlugin.java: -------------------------------------------------------------------------------- 1 | package org.springframework.gradle.maven; 2 | 3 | import org.gradle.api.Plugin; 4 | import org.gradle.api.Project; 5 | import org.gradle.api.publish.PublishingExtension; 6 | import org.gradle.api.publish.maven.plugins.MavenPublishPlugin; 7 | 8 | import java.io.File; 9 | 10 | public class PublishLocalPlugin implements Plugin { 11 | @Override 12 | public void apply(Project project) { 13 | project.getPlugins().withType(MavenPublishPlugin.class).all(mavenPublish -> { 14 | PublishingExtension publishing = project.getExtensions().getByType(PublishingExtension.class); 15 | publishing.getRepositories().maven(maven -> { 16 | maven.setName("local"); 17 | maven.setUrl(new File(project.getRootProject().getBuildDir(), "publications/repos")); 18 | }); 19 | }); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /buildSrc/src/main/java/org/springframework/gradle/maven/SpringMavenPlugin.java: -------------------------------------------------------------------------------- 1 | package org.springframework.gradle.maven; 2 | 3 | import io.spring.gradle.convention.ArtifactoryPlugin; 4 | import org.gradle.api.Plugin; 5 | import org.gradle.api.Project; 6 | import org.gradle.api.plugins.PluginManager; 7 | import org.gradle.api.publish.maven.plugins.MavenPublishPlugin; 8 | 9 | public class SpringMavenPlugin implements Plugin { 10 | @Override 11 | public void apply(Project project) { 12 | PluginManager pluginManager = project.getPluginManager(); 13 | pluginManager.apply(MavenPublishPlugin.class); 14 | pluginManager.apply(SpringSigningPlugin.class); 15 | pluginManager.apply(MavenPublishingConventionsPlugin.class); 16 | pluginManager.apply(PublishAllJavaComponentsPlugin.class); 17 | pluginManager.apply(PublishLocalPlugin.class); 18 | pluginManager.apply(PublishArtifactsPlugin.class); 19 | pluginManager.apply(ArtifactoryPlugin.class); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /buildSrc/src/main/java/org/springframework/gradle/maven/SpringNexusPublishPlugin.java: -------------------------------------------------------------------------------- 1 | package org.springframework.gradle.maven; 2 | 3 | import io.github.gradlenexus.publishplugin.NexusPublishExtension; 4 | import io.github.gradlenexus.publishplugin.NexusPublishPlugin; 5 | import io.github.gradlenexus.publishplugin.NexusRepository; 6 | import org.gradle.api.Action; 7 | import org.gradle.api.Plugin; 8 | import org.gradle.api.Project; 9 | 10 | import java.net.URI; 11 | import java.time.Duration; 12 | 13 | public class SpringNexusPublishPlugin implements Plugin { 14 | @Override 15 | public void apply(Project project) { 16 | project.getPlugins().apply(NexusPublishPlugin.class); 17 | NexusPublishExtension nexusPublishing = project.getExtensions().findByType(NexusPublishExtension.class); 18 | nexusPublishing.getRepositories().create("ossrh", new Action() { 19 | @Override 20 | public void execute(NexusRepository nexusRepository) { 21 | nexusRepository.getNexusUrl().set(URI.create("https://s01.oss.sonatype.org/service/local/")); 22 | nexusRepository.getSnapshotRepositoryUrl().set(URI.create("https://s01.oss.sonatype.org/content/repositories/snapshots/")); 23 | } 24 | }); 25 | nexusPublishing.getConnectTimeout().set(Duration.ofMinutes(3)); 26 | nexusPublishing.getClientTimeout().set(Duration.ofMinutes(3)); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /buildSrc/src/main/resources/META-INF/gradle-plugins/io.spring.convention.artifactory.properties: -------------------------------------------------------------------------------- 1 | implementation-class=io.spring.gradle.convention.ArtifactoryPlugin -------------------------------------------------------------------------------- /buildSrc/src/main/resources/META-INF/gradle-plugins/io.spring.convention.bom.properties: -------------------------------------------------------------------------------- 1 | implementation-class=io.spring.gradle.convention.MavenBomPlugin -------------------------------------------------------------------------------- /buildSrc/src/main/resources/META-INF/gradle-plugins/io.spring.convention.checkstyle.properties: -------------------------------------------------------------------------------- 1 | implementation-class=io.spring.gradle.convention.CheckstylePlugin 2 | -------------------------------------------------------------------------------- /buildSrc/src/main/resources/META-INF/gradle-plugins/io.spring.convention.docs.properties: -------------------------------------------------------------------------------- 1 | implementation-class=io.spring.gradle.convention.DocsPlugin -------------------------------------------------------------------------------- /buildSrc/src/main/resources/META-INF/gradle-plugins/io.spring.convention.include-check-remote.properties: -------------------------------------------------------------------------------- 1 | implementation-class=io.spring.gradle.convention.IncludeCheckRemotePlugin 2 | -------------------------------------------------------------------------------- /buildSrc/src/main/resources/META-INF/gradle-plugins/io.spring.convention.integration-test.properties: -------------------------------------------------------------------------------- 1 | implementation-class=io.spring.gradle.convention.IntegrationTestPlugin -------------------------------------------------------------------------------- /buildSrc/src/main/resources/META-INF/gradle-plugins/io.spring.convention.jacoco.properties: -------------------------------------------------------------------------------- 1 | implementation-class=io.spring.gradle.convention.JacocoPlugin -------------------------------------------------------------------------------- /buildSrc/src/main/resources/META-INF/gradle-plugins/io.spring.convention.javadoc-api.properties: -------------------------------------------------------------------------------- 1 | implementation-class=io.spring.gradle.convention.JavadocApiPlugin -------------------------------------------------------------------------------- /buildSrc/src/main/resources/META-INF/gradle-plugins/io.spring.convention.javadoc-options.properties: -------------------------------------------------------------------------------- 1 | implementation-class=io.spring.gradle.convention.JavadocOptionsPlugin -------------------------------------------------------------------------------- /buildSrc/src/main/resources/META-INF/gradle-plugins/io.spring.convention.repository.properties: -------------------------------------------------------------------------------- 1 | implementation-class=io.spring.gradle.convention.RepositoryConventionPlugin -------------------------------------------------------------------------------- /buildSrc/src/main/resources/META-INF/gradle-plugins/io.spring.convention.root.properties: -------------------------------------------------------------------------------- 1 | implementation-class=io.spring.gradle.convention.RootProjectPlugin -------------------------------------------------------------------------------- /buildSrc/src/main/resources/META-INF/gradle-plugins/io.spring.convention.spring-module.properties: -------------------------------------------------------------------------------- 1 | implementation-class=io.spring.gradle.convention.SpringModulePlugin -------------------------------------------------------------------------------- /buildSrc/src/main/resources/META-INF/gradle-plugins/io.spring.convention.spring-sample-boot.properties: -------------------------------------------------------------------------------- 1 | implementation-class=io.spring.gradle.convention.SpringSampleBootPlugin 2 | -------------------------------------------------------------------------------- /buildSrc/src/main/resources/META-INF/gradle-plugins/io.spring.convention.spring-sample-war.properties: -------------------------------------------------------------------------------- 1 | implementation-class=io.spring.gradle.convention.SpringSampleWarPlugin 2 | -------------------------------------------------------------------------------- /buildSrc/src/main/resources/META-INF/gradle-plugins/io.spring.convention.spring-sample.properties: -------------------------------------------------------------------------------- 1 | implementation-class=io.spring.gradle.convention.SpringSamplePlugin 2 | -------------------------------------------------------------------------------- /buildSrc/src/main/resources/META-INF/gradle-plugins/io.spring.convention.spring-test.properties: -------------------------------------------------------------------------------- 1 | implementation-class=io.spring.gradle.convention.SpringTestPlugin -------------------------------------------------------------------------------- /buildSrc/src/main/resources/META-INF/gradle-plugins/io.spring.convention.springdependencymangement.properties: -------------------------------------------------------------------------------- 1 | implementation-class=io.spring.gradle.convention.SpringDependencyManagementConventionPlugin 2 | -------------------------------------------------------------------------------- /buildSrc/src/main/resources/META-INF/gradle-plugins/io.spring.convention.tests-configuration.properties: -------------------------------------------------------------------------------- 1 | implementation-class=io.spring.gradle.convention.TestsConfigurationPlugin -------------------------------------------------------------------------------- /buildSrc/src/test/java/io/spring/gradle/convention/JacocoPluginITest.java: -------------------------------------------------------------------------------- 1 | package io.spring.gradle.convention; 2 | 3 | import org.gradle.testkit.runner.BuildResult; 4 | import org.gradle.testkit.runner.TaskOutcome; 5 | import org.junit.Test; 6 | import org.junit.jupiter.api.BeforeEach; 7 | import org.junit.jupiter.api.io.TempDir; 8 | 9 | import java.io.File; 10 | import java.nio.file.Path; 11 | 12 | import static org.assertj.core.api.Assertions.assertThat; 13 | 14 | public class JacocoPluginITest{ 15 | private io.spring.gradle.TestKit testKit; 16 | 17 | @BeforeEach 18 | void setup(@TempDir Path tempDir) { 19 | this.testKit = new io.spring.gradle.TestKit(tempDir.toFile()); 20 | } 21 | 22 | @Test 23 | public void checkWithJavaPlugin() throws Exception { 24 | BuildResult result = this.testKit.withProjectResource("samples/jacoco/java/") 25 | .withArguments("check") 26 | .build(); 27 | assertThat(result.task(":check").getOutcome()).isEqualTo(TaskOutcome.SUCCESS); 28 | assertThat(new File(testKit.getRootDir(), "build/jacoco")).exists(); 29 | assertThat(new File(testKit.getRootDir(), "build/reports/jacoco/test/html/")).exists(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /buildSrc/src/test/java/io/spring/gradle/convention/TestsConfigurationPluginITest.java: -------------------------------------------------------------------------------- 1 | package io.spring.gradle.convention; 2 | 3 | import io.spring.gradle.TestKit; 4 | import org.gradle.testkit.runner.BuildResult; 5 | import org.gradle.testkit.runner.TaskOutcome; 6 | import org.junit.jupiter.api.BeforeEach; 7 | import org.junit.jupiter.api.Test; 8 | import org.junit.jupiter.api.io.TempDir; 9 | 10 | import java.nio.file.Path; 11 | 12 | import static org.assertj.core.api.Assertions.assertThat; 13 | 14 | public class TestsConfigurationPluginITest { 15 | 16 | private TestKit testKit; 17 | 18 | @BeforeEach 19 | void setup(@TempDir Path tempDir) { 20 | this.testKit = new TestKit(tempDir.toFile()); 21 | } 22 | 23 | @Test 24 | public void canFindDepencency() throws Exception { 25 | BuildResult result = this.testKit.withProjectResource("samples/testsconfiguration") 26 | .withArguments("check") 27 | .build(); 28 | assertThat(result.task(":web:check").getOutcome()).isEqualTo(TaskOutcome.SUCCESS); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/integrationtest/withgroovy/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'io.spring.convention.integration-test' 3 | } 4 | 5 | apply plugin: 'java' 6 | apply plugin: 'groovy' 7 | 8 | repositories { 9 | mavenCentral() 10 | } 11 | 12 | dependencies { 13 | testImplementation platform('org.junit:junit-bom:5.8.1') 14 | testImplementation 'org.junit.jupiter:junit-jupiter-api' 15 | testImplementation 'org.junit.jupiter:junit-jupiter-engine' 16 | testImplementation 'org.spockframework:spock-core:1.0-groovy-2.4' 17 | integrationTestCompile 'org.springframework:spring-core:4.3.7.RELEASE' 18 | } 19 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/integrationtest/withgroovy/src/integration-test/groovy/sample/TheTest.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package sample; 18 | 19 | import org.springframework.core.Ordered; 20 | import spock.lang.Specification; 21 | 22 | class TheTest extends Specification { 23 | def "has Ordered"() { 24 | expect: 'Loads Ordered fine' 25 | Ordered ordered = new Ordered() { 26 | @Override 27 | int getOrder() { 28 | return 0 29 | } 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/integrationtest/withjava/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'io.spring.convention.integration-test' 3 | } 4 | 5 | apply plugin: 'java' 6 | 7 | repositories { 8 | mavenCentral() 9 | } 10 | 11 | dependencies { 12 | testImplementation platform('org.junit:junit-bom:5.8.1') 13 | testImplementation 'org.junit.jupiter:junit-jupiter-api' 14 | testImplementation 'org.junit.jupiter:junit-jupiter-engine' 15 | integrationTestCompile 'org.springframework:spring-core:4.3.7.RELEASE' 16 | } -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/integrationtest/withjava/src/integration-test/java/sample/TheTest.java: -------------------------------------------------------------------------------- 1 | package sample; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.core.Ordered; 5 | 6 | public class TheTest { 7 | @Test 8 | public void compilesAndRuns() { 9 | Ordered ordered = new Ordered() { 10 | @Override 11 | public int getOrder() { 12 | return 0; 13 | } 14 | }; 15 | } 16 | } -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/integrationtest/withpropdeps/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'io.spring.convention.integration-test' 3 | } 4 | 5 | apply plugin: 'java' 6 | 7 | repositories { 8 | mavenCentral() 9 | } 10 | 11 | dependencies { 12 | optional 'jakarta.servlet:jakarta.servlet-api:5.0.0' 13 | testImplementation platform('org.junit:junit-bom:5.8.1') 14 | testImplementation 'org.junit.jupiter:junit-jupiter-api' 15 | testImplementation 'org.junit.jupiter:junit-jupiter-engine' 16 | } 17 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/integrationtest/withpropdeps/src/integration-test/java/sample/TheTest.java: -------------------------------------------------------------------------------- 1 | package sample; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import jakarta.servlet.http.HttpServletRequest; 5 | 6 | public class TheTest { 7 | @Test 8 | public void compilesAndRuns() { 9 | HttpServletRequest request = null; 10 | } 11 | } -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/jacoco/java/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'io.spring.convention.jacoco' 3 | } 4 | 5 | apply plugin: 'java' 6 | 7 | repositories { 8 | mavenCentral() 9 | } 10 | 11 | dependencies { 12 | testImplementation platform('org.junit:junit-bom:5.8.1') 13 | testImplementation 'org.junit.jupiter:junit-jupiter-api' 14 | testImplementation 'org.junit.jupiter:junit-jupiter-engine' 15 | } 16 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/jacoco/java/src/main/java/sample/TheClass.java: -------------------------------------------------------------------------------- 1 | package sample; 2 | 3 | public class TheClass { 4 | public boolean doStuff(boolean b) { 5 | if(b) { 6 | return true; 7 | } else { 8 | return false; 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/jacoco/java/src/test/java/sample/TheClassTest.java: -------------------------------------------------------------------------------- 1 | package sample; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | public class TheClassTest { 8 | TheClass theClass = new TheClass(); 9 | 10 | @Test 11 | public void doStuffWhenTrueThenTrue() { 12 | assertThat(theClass.doStuff(true)).isTrue(); 13 | } 14 | 15 | @Test 16 | public void doStuffWhenTrueThenFalse() { 17 | assertThat(theClass.doStuff(false)).isFalse(); 18 | } 19 | } -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/javadocapi/multimodule/api/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'io.spring.convention.spring-module' -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/javadocapi/multimodule/api/src/main/java/sample/Api.java: -------------------------------------------------------------------------------- 1 | package sample; 2 | 3 | /** 4 | * Testing this 5 | * @author Rob Winch 6 | * 7 | */ 8 | public class Api { 9 | 10 | /** 11 | * This does stuff 12 | */ 13 | public void doStuff() {} 14 | } 15 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/javadocapi/multimodule/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'io.spring.convention.javadoc-api' 3 | id 'io.spring.convention.spring-module' apply false 4 | id 'io.spring.convention.spring-sample' apply false 5 | } 6 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/javadocapi/multimodule/impl/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'io.spring.convention.spring-module' -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/javadocapi/multimodule/impl/src/main/java/sample/Impl.java: -------------------------------------------------------------------------------- 1 | package sample; 2 | 3 | /** 4 | * Testing this 5 | * @author Rob Winch 6 | * 7 | */ 8 | public class Impl { 9 | 10 | /** 11 | * This does stuff 12 | */ 13 | public void otherThings() {} 14 | } 15 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/javadocapi/multimodule/sample/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'io.spring.convention.spring-sample' 2 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/javadocapi/multimodule/sample/src/main/java/sample/Sample.java: -------------------------------------------------------------------------------- 1 | package sample; 2 | 3 | /** 4 | * Testing this 5 | * @author Rob Winch 6 | * 7 | */ 8 | public class Sample { 9 | 10 | /** 11 | * This does stuff 12 | */ 13 | public void doSample() {} 14 | } 15 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/javadocapi/multimodule/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':api' 2 | include ':impl' 3 | include ':sample' -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/maven/install-with-springio/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'io.spring.convention.spring-module' 3 | } 4 | 5 | repositories { 6 | mavenCentral() 7 | } 8 | 9 | dependencies { 10 | testImplementation platform('org.junit:junit-bom:5.8.1') 11 | testImplementation 'org.junit.jupiter:junit-jupiter-api' 12 | testImplementation 'org.junit.jupiter:junit-jupiter-engine' 13 | implementation 'org.springframework:spring-core' 14 | } 15 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/maven/install-with-springio/gradle/dependency-management.gradle: -------------------------------------------------------------------------------- 1 | dependencyManagement { 2 | dependencies { 3 | dependency 'org.springframework:spring-core:3.0.0.RELEASE' 4 | } 5 | } -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/maven/install/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'io.spring.convention.root' 3 | } 4 | 5 | apply plugin: 'io.spring.convention.maven' 6 | 7 | repositories { 8 | mavenCentral() 9 | } 10 | 11 | dependencies { 12 | testImplementation platform('org.junit:junit-bom:5.8.1') 13 | testImplementation 'org.junit.jupiter:junit-jupiter-api' 14 | testImplementation 'org.junit.jupiter:junit-jupiter-engine' 15 | optional 'aopalliance:aopalliance:1.0' 16 | } -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/maven/signing/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'io.spring.convention.root' 3 | } 4 | 5 | version = "1.0.0.RELEASE" 6 | 7 | apply plugin: 'io.spring.convention.maven' 8 | 9 | repositories { 10 | mavenCentral() 11 | } 12 | 13 | dependencies { 14 | testImplementation platform('org.junit:junit-bom:5.8.1') 15 | testImplementation 'org.junit.jupiter:junit-jupiter-api' 16 | testImplementation 'org.junit.jupiter:junit-jupiter-engine' 17 | optional 'aopalliance:aopalliance:1.0' 18 | } -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/maven/signing/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'signing' -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/maven/upload/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'io.spring.convention.root' 3 | } 4 | 5 | repositories { 6 | mavenCentral() 7 | } 8 | 9 | dependencies { 10 | testImplementation platform('org.junit:junit-bom:5.8.1') 11 | testImplementation 'org.junit.jupiter:junit-jupiter-api' 12 | testImplementation 'org.junit.jupiter:junit-jupiter-engine' 13 | optional 'aopalliance:aopalliance:1.0' 14 | } 15 | 16 | uploadArchives { 17 | repositories { 18 | mavenDeployer { 19 | repository(url: "file:$buildDir/repo") 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/showcase/bom/bom.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'io.spring.convention.bom' 2 | 3 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/showcase/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'io.spring.convention.root' 3 | } 4 | 5 | group = "org.springframework.build.test" 6 | version = "1.0.0.BUILD-SNAPSHOT" 7 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/showcase/etc/checkstyle/checkstyle.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/showcase/samples/sgbcs-sample-war/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "org.gretty" version "4.1.0" 3 | id "io.spring.convention.spring-sample-war" 4 | } 5 | 6 | dependencies { 7 | provided 'jakarta.servlet:jakarta.servlet-api:5.0.0' 8 | testImplementation 'commons-io:commons-io:2.11.0' 9 | testImplementation 'org.assertj:assertj-core:3.21.0' 10 | testImplementation platform('org.junit:junit-bom:5.8.1') 11 | testImplementation 'org.junit.jupiter:junit-jupiter-api' 12 | testImplementation 'org.junit.jupiter:junit-jupiter-engine' 13 | } 14 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/showcase/samples/sgbcs-sample-war/src/integration-test/java/sample/HelloServletTest.java: -------------------------------------------------------------------------------- 1 | package sample; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | 5 | import java.io.InputStream; 6 | import java.net.URL; 7 | import java.nio.charset.Charset; 8 | 9 | import org.apache.commons.io.IOUtils; 10 | import org.junit.jupiter.api.Test; 11 | 12 | public class HelloServletTest { 13 | 14 | @Test 15 | public void hello() throws Exception { 16 | String url = System.getProperty("app.baseURI"); 17 | try (InputStream get = new URL(url).openConnection().getInputStream()) { 18 | String hello = IOUtils.toString(get, Charset.defaultCharset()); 19 | assertThat(hello).isEqualTo("Hello"); 20 | } 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/showcase/settings.gradle: -------------------------------------------------------------------------------- 1 | import java.util.regex.Matcher 2 | 3 | rootProject.name = 'spring-gradle-build-conventions-sample' 4 | 5 | 6 | FileTree projects = fileTree(rootDir) { 7 | include '**/*.gradle' 8 | exclude '**/gradle', 'settings.gradle', 'buildSrc', '/build.gradle', '.*' 9 | } 10 | 11 | String rootDirPath = rootDir.absolutePath + File.separator 12 | projects.each { File buildFile -> 13 | String buildFilePath = buildFile.parentFile.absolutePath 14 | 15 | String projectPath = buildFilePath.replace(rootDirPath, '').replaceAll(Matcher.quoteReplacement(File.separator), ':') 16 | 17 | include projectPath 18 | 19 | def project = findProject(":${projectPath}") 20 | if(!'build.gradle'.equals(buildFile.name)) { 21 | project.name = buildFile.name.replace('.gradle','') 22 | project.buildFileName = buildFile.name 23 | } 24 | project.projectDir = buildFile.parentFile 25 | } 26 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/showcase/sgbcs-api/sgbcs-api.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'io.spring.convention.spring-module' 2 | 3 | dependencies { 4 | api platform('org.springframework.boot:spring-boot-dependencies:2.5.2') 5 | implementation 'org.springframework:spring-web' 6 | implementation 'org.springframework:spring-core' 7 | testImplementation "org.junit.jupiter:junit-jupiter-api" 8 | testImplementation "org.junit.jupiter:junit-jupiter-engine" 9 | } 10 | 11 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/showcase/sgbcs-api/src/main/java/api/Api.java: -------------------------------------------------------------------------------- 1 | package api; 2 | 3 | /** 4 | * 5 | * @author Rob Winch 6 | * 7 | */ 8 | public class Api { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/showcase/sgbcs-api/src/test/java/api/ApiTest.java: -------------------------------------------------------------------------------- 1 | package api; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | public class ApiTest { 6 | 7 | @Test 8 | public void api() {} 9 | } 10 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/showcase/sgbcs-core/sgbcs-core.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'io.spring.convention.spring-module' 2 | 3 | dependencies { 4 | api platform('org.springframework.boot:spring-boot-dependencies:2.5.2') 5 | optional 'ch.qos.logback:logback-classic' 6 | testImplementation "org.junit.jupiter:junit-jupiter-api" 7 | testImplementation "org.junit.jupiter:junit-jupiter-engine" 8 | } 9 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/showcase/sgbcs-core/src/main/java/core/CoreClass.java: -------------------------------------------------------------------------------- 1 | package core; 2 | 3 | /** 4 | * 5 | * @author Rob Winch 6 | * 7 | */ 8 | public class CoreClass { 9 | 10 | public void run() { 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/showcase/sgbcs-core/src/main/java/core/HasOptional.java: -------------------------------------------------------------------------------- 1 | package core; 2 | 3 | 4 | import org.slf4j.Logger; 5 | import org.slf4j.LoggerFactory; 6 | 7 | 8 | public class HasOptional { 9 | 10 | public static void doStuffWithOptionalDependency() { 11 | Logger logger = LoggerFactory.getLogger(HasOptional.class); 12 | logger.debug("This is optional"); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/showcase/sgbcs-core/src/main/resources/META-INF/spring.handlers: -------------------------------------------------------------------------------- 1 | http\://www.springframework.org/schema/springgradlebuildsample=org.springframework.ldap.config.LdapNamespaceHandler -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/showcase/sgbcs-core/src/main/resources/META-INF/spring.schemas: -------------------------------------------------------------------------------- 1 | http\://www.springframework.org/schema/springgradlebuildsample/spring-springgradlebuildsample.xsd=org/springframework/springgradlebuildsample/config/spring-springgradlebuildsample-2.2.xsd 2 | http\://www.springframework.org/schema/springgradlebuildsample/spring-springgradlebuildsample-2.0.xsd=org/springframework/springgradlebuildsample/config/spring-springgradlebuildsample-2.0.xsd 3 | http\://www.springframework.org/schema/springgradlebuildsample/spring-springgradlebuildsample-2.1.xsd=org/springframework/springgradlebuildsample/config/spring-springgradlebuildsample-2.1.xsd 4 | http\://www.springframework.org/schema/springgradlebuildsample/spring-springgradlebuildsample-2.2.xsd=org/springframework/springgradlebuildsample/config/spring-springgradlebuildsample-2.2.xsd -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/showcase/sgbcs-core/src/test/java/core/CoreClassTest.java: -------------------------------------------------------------------------------- 1 | package core; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | public class CoreClassTest { 6 | 7 | @Test 8 | public void test() { 9 | new CoreClass().run(); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/showcase/sgbcs-core/src/test/java/core/HasOptionalTest.java: -------------------------------------------------------------------------------- 1 | package core; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | public class HasOptionalTest { 6 | 7 | @Test 8 | public void test() { 9 | HasOptional.doStuffWithOptionalDependency(); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/showcase/sgbcs-docs/sgbcs-docs.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java' 2 | apply plugin: 'io.spring.convention.docs' 3 | 4 | version = "1.0.0.BUILD-SNAPSHOT" 5 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/showcase/sgbcs-docs/src/docs/asciidoc/docinfo.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/showcase/sgbcs-docs/src/docs/asciidoc/images/sunset.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/buildSrc/src/test/resources/samples/showcase/sgbcs-docs/src/docs/asciidoc/images/sunset.jpg -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/showcase/sgbcs-docs/src/docs/asciidoc/index.adoc: -------------------------------------------------------------------------------- 1 | = Example Manual 2 | Doc Writer 3 | 2014-09-09 4 | :example-caption!: 5 | ifndef::imagesdir[:imagesdir: images] 6 | ifndef::sourcedir[:sourcedir: ../java] 7 | 8 | This is a user manual for an example project. 9 | 10 | == Introduction 11 | 12 | This project does something. 13 | We just haven't decided what that is yet. 14 | 15 | == Source Code 16 | 17 | [source,java] 18 | .Java code from project 19 | ---- 20 | include::{sourcedir}/example/StringUtils.java[tags=contains,indent=0] 21 | ---- 22 | 23 | This page was built by the following command: 24 | 25 | $ ./gradlew asciidoctor 26 | 27 | == Images 28 | 29 | [.thumb] 30 | image::sunset.jpg[scaledwidth=75%] 31 | 32 | == Attributes 33 | 34 | .Built-in 35 | asciidoctor-version:: {asciidoctor-version} 36 | safe-mode-name:: {safe-mode-name} 37 | docdir:: {docdir} 38 | docfile:: {docfile} 39 | imagesdir:: {imagesdir} 40 | revnumber:: {revnumber} 41 | 42 | .Custom 43 | sourcedir:: {sourcedir} 44 | endpoint-url:: {endpoint-url} 45 | 46 | == Includes 47 | 48 | .include::subdir/_b.adoc[] 49 | ==== 50 | include::subdir/_b.adoc[] 51 | ==== 52 | 53 | WARNING: Includes can be tricky! 54 | 55 | == build.gradle 56 | 57 | [source,groovy] 58 | ---- 59 | include::{build-gradle}[] 60 | ---- 61 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/showcase/sgbcs-docs/src/docs/asciidoc/subdir/_b.adoc: -------------------------------------------------------------------------------- 1 | content from _src/docs/asciidoc/subdir/_b.adoc_. 2 | 3 | .include::_c.adoc[] 4 | [example] 5 | -- 6 | include::_c.adoc[] 7 | -- 8 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/showcase/sgbcs-docs/src/docs/asciidoc/subdir/_c.adoc: -------------------------------------------------------------------------------- 1 | content from _src/docs/asciidoc/subdir/c.adoc_. 2 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/showcase/sgbcs-docs/src/main/java/example/StringUtils.java: -------------------------------------------------------------------------------- 1 | package example; 2 | 3 | public class StringUtils { 4 | // tag::contains[] 5 | public boolean contains(String haystack, String needle) { 6 | return haystack.contains(needle); 7 | } 8 | // end::contains[] 9 | } 10 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/testsconfiguration/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'io.spring.convention.tests-configuration' 3 | id 'java' 4 | } 5 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/testsconfiguration/core/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'io.spring.convention.tests-configuration' 2 | apply plugin: 'java' // second to test ordering 3 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/testsconfiguration/core/src/test/java/sample/Dependency.java: -------------------------------------------------------------------------------- 1 | package sample; 2 | 3 | public class Dependency {} -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/testsconfiguration/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':core' 2 | include ':web' -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/testsconfiguration/web/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java' 2 | 3 | repositories { 4 | mavenCentral() 5 | } 6 | 7 | dependencies { 8 | testImplementation project(path: ':core', configuration: 'tests') 9 | testImplementation platform('org.junit:junit-bom:5.8.1') 10 | testImplementation 'org.junit.jupiter:junit-jupiter-api' 11 | testImplementation 'org.junit.jupiter:junit-jupiter-engine' 12 | } 13 | -------------------------------------------------------------------------------- /buildSrc/src/test/resources/samples/testsconfiguration/web/src/test/java/sample/DependencyTest.java: -------------------------------------------------------------------------------- 1 | package sample; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | public class DependencyTest { 6 | @Test 7 | public void findsDependencyOnClasspath() { 8 | new Dependency(); 9 | } 10 | } -------------------------------------------------------------------------------- /etc/checkstyle/suppressions.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 2 | org.gradle.parallel=true 3 | version=3.5.1-SNAPSHOT 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /scripts/release/release-notes-sections.yml: -------------------------------------------------------------------------------- 1 | changelog: 2 | repository: spring-projects/spring-session 3 | issues: 4 | exclude: 5 | labels: ["status: duplicate", "status: invalid", "status: declined", "github_actions"] 6 | ports: 7 | - label: "status: forward-port" 8 | bodyExpression: 'Forward port of issue #(\d+).*' 9 | sections: 10 | - title: ":star: New Features" 11 | labels: [ "type: enhancement" ] 12 | sort: "title" 13 | - title: ":beetle: Bug Fixes" 14 | labels: [ "type: bug", "type: regression" ] 15 | sort: "title" 16 | - title: ":hammer: Dependency Upgrades" 17 | labels: [ "type: dependency-upgrade" ] 18 | sort: "title" 19 | - title: ":rewind: Non-passive" 20 | labels: [ "type: breaks-passivity" ] 21 | sort: "title" 22 | contributors: 23 | title: ":heart: Contributors" 24 | exclude: 25 | names: ["marcusdacoregio", "dependabot[bot]"] 26 | -------------------------------------------------------------------------------- /scripts/release/wait-for-done.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | VERSION=$1 4 | until http -h --check-status --ignore-stdin https://repo1.maven.org/maven2/org/springframework/session/spring-session-core/$VERSION/; do sleep 10; clear; done; spd-say "It is now uploaded" 5 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | maven { url 'https://repo.spring.io/plugins-release' } 5 | } 6 | } 7 | 8 | plugins { 9 | id "com.gradle.develocity" version "3.17.6" 10 | id "io.spring.ge.conventions" version "0.0.17" 11 | } 12 | 13 | rootProject.name = 'spring-session-build' 14 | 15 | include 'spring-session-dependencies' 16 | include 'spring-session-bom' 17 | include 'spring-session-core' 18 | include 'spring-session-data-mongodb' 19 | include 'spring-session-data-redis' 20 | include 'spring-session-docs' 21 | include 'spring-session-hazelcast' 22 | include 'spring-session-jdbc' 23 | 24 | file('spring-session-samples').eachDirMatch(~/spring-session-sample-.*/) { dir -> 25 | include dir.name 26 | project(":$dir.name").projectDir = dir 27 | } 28 | 29 | rootProject.children.each { project -> 30 | project.buildFileName = "${project.name}.gradle" 31 | } 32 | 33 | -------------------------------------------------------------------------------- /spring-session-bom/spring-session-bom.gradle: -------------------------------------------------------------------------------- 1 | import io.spring.gradle.convention.SpringModulePlugin 2 | 3 | plugins { 4 | id("io.spring.convention.bom") 5 | } 6 | 7 | dependencies { 8 | constraints { 9 | project.rootProject.allprojects { project -> 10 | project.plugins.withType(SpringModulePlugin) { 11 | api(project) 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /spring-session-core/src/main/java/org/springframework/session/SessionIdGenerator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.session; 18 | 19 | import org.springframework.lang.NonNull; 20 | 21 | /** 22 | * An interface for specifying a strategy for generating session identifiers. 23 | * 24 | * @author Marcus da Coregio 25 | * @since 3.2 26 | */ 27 | public interface SessionIdGenerator { 28 | 29 | @NonNull 30 | String generate(); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /spring-session-core/src/main/java/org/springframework/session/web/server/session/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Spring Session reactive web support. 19 | */ 20 | @NonNullApi 21 | package org.springframework.session.web.server.session; 22 | 23 | import org.springframework.lang.NonNullApi; 24 | -------------------------------------------------------------------------------- /spring-session-core/src/main/resources/META-INF/spring/aot.factories: -------------------------------------------------------------------------------- 1 | org.springframework.aot.hint.RuntimeHintsRegistrar=\ 2 | org.springframework.session.aot.hint.CommonSessionRuntimeHints,\ 3 | org.springframework.session.aot.hint.CommonSessionSecurityRuntimeHints,\ 4 | org.springframework.session.aot.hint.servlet.HttpSessionSecurityRuntimeHints,\ 5 | org.springframework.session.aot.hint.server.WebSessionSecurityRuntimeHints 6 | -------------------------------------------------------------------------------- /spring-session-data-mongodb/src/main/java/org/springframework/session/data/mongo/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Spring Session MongoDB support. 19 | * 20 | * @author Greg Turnquist 21 | */ 22 | @NonNullApi 23 | package org.springframework.session.data.mongo; 24 | 25 | import org.springframework.lang.NonNullApi; 26 | -------------------------------------------------------------------------------- /spring-session-data-mongodb/src/test/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%8.-8thread] %-5level %logger{36} - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /spring-session-data-redis/src/integration-test/resources/testcontainers.properties: -------------------------------------------------------------------------------- 1 | ryuk.container.timeout=120 2 | -------------------------------------------------------------------------------- /spring-session-data-redis/src/main/java/org/springframework/session/data/redis/config/ConfigureRedisAction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2018 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.session.data.redis.config; 18 | 19 | import org.springframework.data.redis.connection.RedisConnection; 20 | 21 | /** 22 | * Allows specifying a strategy for configuring and validating Redis. 23 | * 24 | * @author Rob Winch 25 | * @since 1.0.1 26 | */ 27 | public interface ConfigureRedisAction { 28 | 29 | void configure(RedisConnection connection); 30 | 31 | /** 32 | * A do nothing implementation of {@link ConfigureRedisAction}. 33 | */ 34 | ConfigureRedisAction NO_OP = (connection) -> { 35 | }; 36 | 37 | } 38 | -------------------------------------------------------------------------------- /spring-session-data-redis/src/test/resources/org/springframework/session/data/redis/config/annotation/web/http/RedisHttpSessionConfigurationClassPathXmlApplicationContextTests-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | -------------------------------------------------------------------------------- /spring-session-data-redis/src/test/resources/org/springframework/session/data/redis/config/annotation/web/http/RedisHttpSessionConfigurationXmlCustomExpireTests-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 13 | 14 | 16 | 17 | -------------------------------------------------------------------------------- /spring-session-data-redis/src/test/resources/org/springframework/session/data/redis/config/annotation/web/http/RedisHttpSessionConfigurationXmlTests-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | -------------------------------------------------------------------------------- /spring-session-docs/antora.yml: -------------------------------------------------------------------------------- 1 | name: session 2 | version: true 3 | title: Spring Session 4 | start_page: ROOT:index.adoc 5 | nav: 6 | - modules/ROOT/nav.adoc 7 | ext: 8 | collector: 9 | run: 10 | command: gradlew -q -PbuildSrc.skipTests=true "-Dorg.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError" :spring-session-docs:generateAntoraYml 11 | local: true 12 | scan: 13 | dir: ./build/generated-antora-resources 14 | asciidoc: 15 | attributes: 16 | gh-url: "https://github.com/spring-projects/spring-session/tree/{gh-tag}" 17 | download-url: "https://github.com/spring-projects/spring-session/archive/{gh-tag}.zip" 18 | gh-samples-url: "{gh-url}/spring-session-samples/" 19 | samples-dir: "example$spring-session-samples/" 20 | session-jdbc-main-resources-dir: "example$session-jdbc-main-resources-dir/" 21 | spring-session-data-mongodb-dir: "example$spring-session-data-mongodb-dir/" 22 | docs-test-dir: "example$java/" 23 | websocketdoc-test-dir: 'example$java/docs/websocket/' 24 | docs-test-resources-dir: "example$resources/" 25 | indexdoc-tests: "example$java/docs/IndexDocTests.java" 26 | -------------------------------------------------------------------------------- /spring-session-docs/antora/extensions/version-fix.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports.register = function({ config }) { 4 | 5 | this.on('contentAggregated', ({ contentAggregate }) => { 6 | contentAggregate.forEach(aggregate => { 7 | if (aggregate.version === "2.6.2" && 8 | aggregate.prerelease == "-SNAPSHOT") { 9 | aggregate.version = "2.6.2" 10 | aggregate.displayVersion = `${aggregate.version}` 11 | delete aggregate.prerelease 12 | } 13 | }) 14 | }) 15 | } 16 | -------------------------------------------------------------------------------- /spring-session-docs/modules/ROOT/assets/images/inmemory-sessions.odg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-docs/modules/ROOT/assets/images/inmemory-sessions.odg -------------------------------------------------------------------------------- /spring-session-docs/modules/ROOT/assets/images/inmemory-sessions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-docs/modules/ROOT/assets/images/inmemory-sessions.png -------------------------------------------------------------------------------- /spring-session-docs/modules/ROOT/assets/images/shared-session-storage.odg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-docs/modules/ROOT/assets/images/shared-session-storage.odg -------------------------------------------------------------------------------- /spring-session-docs/modules/ROOT/assets/images/shared-session-storage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-docs/modules/ROOT/assets/images/shared-session-storage.png -------------------------------------------------------------------------------- /spring-session-docs/modules/ROOT/examples/java/docs/http/HttpSessionListenerXmlTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package docs.http; 18 | 19 | import org.springframework.test.context.ContextConfiguration; 20 | 21 | /** 22 | * @author Rob Winch 23 | * 24 | */ 25 | @ContextConfiguration 26 | class HttpSessionListenerXmlTests extends AbstractHttpSessionListenerTests { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /spring-session-docs/modules/ROOT/examples/resources/docs/HttpSessionConfigurationNoOpConfigureRedisActionXmlTests-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 18 | 19 | 20 | 22 | 23 | -------------------------------------------------------------------------------- /spring-session-docs/modules/ROOT/examples/resources/docs/http/HttpSessionListenerXmlTests-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /spring-session-docs/modules/ROOT/examples/resources/docs/security/security-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /spring-session-docs/modules/ROOT/examples/session-jdbc-main-resources-dir: -------------------------------------------------------------------------------- 1 | ../../../../spring-session-jdbc/src/main/resources -------------------------------------------------------------------------------- /spring-session-docs/modules/ROOT/examples/spring-session-data-mongodb-dir: -------------------------------------------------------------------------------- 1 | ../../../../spring-session-data-mongodb -------------------------------------------------------------------------------- /spring-session-docs/modules/ROOT/examples/spring-session-samples: -------------------------------------------------------------------------------- 1 | ../../../../spring-session-samples -------------------------------------------------------------------------------- /spring-session-docs/modules/ROOT/pages/configurations.adoc: -------------------------------------------------------------------------------- 1 | [[configuration]] 2 | = Configuration 3 | 4 | This section provides guidance on how to further configure Spring Session for each of its supported datastores. 5 | -------------------------------------------------------------------------------- /spring-session-docs/modules/ROOT/pages/guides/docinfo-footer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /spring-session-docs/modules/ROOT/pages/upgrading.adoc: -------------------------------------------------------------------------------- 1 | [[upgrading-3.0]] 2 | = Upgrading to 3.x 3 | 4 | With the new major release version, the Spring Session team took the opportunity to make some non-passive changes. 5 | The focus of these changes is to improve and harmonize Spring Session's APIs as well as remove the deprecated components. 6 | 7 | == Baseline Update 8 | 9 | Spring Session 3.0 requires Java 17 and Spring Framework 6.0 as a baseline, since its entire codebase is now based on Java 17 source code. 10 | See https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-5.x[Upgrading to Spring Framework 5.x] for more on upgrading Spring Framework. 11 | 12 | == Replaced and Removed Packages, Classes, and Methods 13 | 14 | The following changes were made to packages, classes, and methods: 15 | 16 | 17 | 18 | == Dropped Support 19 | 20 | 21 | -------------------------------------------------------------------------------- /spring-session-docs/modules/ROOT/pages/whats-new.adoc: -------------------------------------------------------------------------------- 1 | = What's New in 3.4 2 | 3 | - https://github.com/spring-projects/spring-session/issues/2787[gh-2787] - Add Partitioned Cookie Support to `DefaultCookieSerializer` 4 | - https://github.com/spring-projects/spring-session/issues/2906[gh-2906] - xref:configuration/redis.adoc#customizing-session-expiration-store[docs] - Allow Customization of Expiration Policy in `RedisIndexedHttpSession` 5 | -------------------------------------------------------------------------------- /spring-session-hazelcast/spring-session-hazelcast.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'io.spring.convention.spring-module' 2 | 3 | dependencies { 4 | management platform(project(":spring-session-dependencies")) 5 | api project(':spring-session-core') 6 | api "com.hazelcast:hazelcast" 7 | api "org.springframework:spring-context" 8 | 9 | testImplementation "jakarta.servlet:jakarta.servlet-api" 10 | testImplementation "org.assertj:assertj-core" 11 | testImplementation "org.mockito:mockito-core" 12 | testImplementation "org.mockito:mockito-junit-jupiter" 13 | testImplementation "org.springframework:spring-test" 14 | testImplementation "org.springframework:spring-web" 15 | testImplementation "org.springframework.security:spring-security-core" 16 | testImplementation "org.junit.jupiter:junit-jupiter-api" 17 | 18 | testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine" 19 | testRuntimeOnly "org.junit.platform:junit-platform-launcher" 20 | 21 | integrationTestCompile "org.testcontainers:testcontainers" 22 | } 23 | -------------------------------------------------------------------------------- /spring-session-hazelcast/src/integration-test/resources/hazelcast-server.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | ETERNAL 14 | LOCAL_AND_CACHED_CLASSES 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /spring-session-hazelcast/src/integration-test/resources/testcontainers.properties: -------------------------------------------------------------------------------- 1 | ryuk.container.timeout=120 2 | -------------------------------------------------------------------------------- /spring-session-jdbc/src/integration-test/resources/container-license-acceptance.txt: -------------------------------------------------------------------------------- 1 | ibmcom/db2:11.5.7.0a 2 | mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04 3 | -------------------------------------------------------------------------------- /spring-session-jdbc/src/integration-test/resources/testcontainers.properties: -------------------------------------------------------------------------------- 1 | ryuk.container.timeout=120 2 | -------------------------------------------------------------------------------- /spring-session-jdbc/src/main/resources/META-INF/spring/aot.factories: -------------------------------------------------------------------------------- 1 | org.springframework.aot.hint.RuntimeHintsRegistrar=\ 2 | org.springframework.session.jdbc.aot.hint.SessionJdbcRuntimeHints 3 | -------------------------------------------------------------------------------- /spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-db2.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE SPRING_SESSION ( 2 | PRIMARY_ID CHAR(36) NOT NULL, 3 | SESSION_ID CHAR(36) NOT NULL, 4 | CREATION_TIME BIGINT NOT NULL, 5 | LAST_ACCESS_TIME BIGINT NOT NULL, 6 | MAX_INACTIVE_INTERVAL INT NOT NULL, 7 | EXPIRY_TIME BIGINT NOT NULL, 8 | PRINCIPAL_NAME VARCHAR(100), 9 | CONSTRAINT SPRING_SESSION_PK PRIMARY KEY (PRIMARY_ID) 10 | ); 11 | 12 | CREATE UNIQUE INDEX SPRING_SESSION_IX1 ON SPRING_SESSION (SESSION_ID); 13 | CREATE INDEX SPRING_SESSION_IX2 ON SPRING_SESSION (EXPIRY_TIME); 14 | CREATE INDEX SPRING_SESSION_IX3 ON SPRING_SESSION (PRINCIPAL_NAME); 15 | 16 | CREATE TABLE SPRING_SESSION_ATTRIBUTES ( 17 | SESSION_PRIMARY_ID CHAR(36) NOT NULL, 18 | ATTRIBUTE_NAME VARCHAR(200) NOT NULL, 19 | ATTRIBUTE_BYTES BLOB NOT NULL, 20 | CONSTRAINT SPRING_SESSION_ATTRIBUTES_PK PRIMARY KEY (SESSION_PRIMARY_ID, ATTRIBUTE_NAME), 21 | CONSTRAINT SPRING_SESSION_ATTRIBUTES_FK FOREIGN KEY (SESSION_PRIMARY_ID) REFERENCES SPRING_SESSION(PRIMARY_ID) ON DELETE CASCADE 22 | ); 23 | -------------------------------------------------------------------------------- /spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-derby.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE SPRING_SESSION ( 2 | PRIMARY_ID CHAR(36) NOT NULL, 3 | SESSION_ID CHAR(36) NOT NULL, 4 | CREATION_TIME BIGINT NOT NULL, 5 | LAST_ACCESS_TIME BIGINT NOT NULL, 6 | MAX_INACTIVE_INTERVAL INT NOT NULL, 7 | EXPIRY_TIME BIGINT NOT NULL, 8 | PRINCIPAL_NAME VARCHAR(100), 9 | CONSTRAINT SPRING_SESSION_PK PRIMARY KEY (PRIMARY_ID) 10 | ); 11 | 12 | CREATE UNIQUE INDEX SPRING_SESSION_IX1 ON SPRING_SESSION (SESSION_ID); 13 | CREATE INDEX SPRING_SESSION_IX2 ON SPRING_SESSION (EXPIRY_TIME); 14 | CREATE INDEX SPRING_SESSION_IX3 ON SPRING_SESSION (PRINCIPAL_NAME); 15 | 16 | CREATE TABLE SPRING_SESSION_ATTRIBUTES ( 17 | SESSION_PRIMARY_ID CHAR(36) NOT NULL, 18 | ATTRIBUTE_NAME VARCHAR(200) NOT NULL, 19 | ATTRIBUTE_BYTES BLOB NOT NULL, 20 | CONSTRAINT SPRING_SESSION_ATTRIBUTES_PK PRIMARY KEY (SESSION_PRIMARY_ID, ATTRIBUTE_NAME), 21 | CONSTRAINT SPRING_SESSION_ATTRIBUTES_FK FOREIGN KEY (SESSION_PRIMARY_ID) REFERENCES SPRING_SESSION(PRIMARY_ID) ON DELETE CASCADE 22 | ); 23 | -------------------------------------------------------------------------------- /spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-drop-db2.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE SPRING_SESSION_ATTRIBUTES; 2 | DROP TABLE SPRING_SESSION; 3 | -------------------------------------------------------------------------------- /spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-drop-derby.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE SPRING_SESSION_ATTRIBUTES; 2 | DROP TABLE SPRING_SESSION; 3 | -------------------------------------------------------------------------------- /spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-drop-h2.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS SPRING_SESSION_ATTRIBUTES; 2 | DROP TABLE IF EXISTS SPRING_SESSION; 3 | -------------------------------------------------------------------------------- /spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-drop-hsqldb.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE SPRING_SESSION_ATTRIBUTES IF EXISTS; 2 | DROP TABLE SPRING_SESSION IF EXISTS; 3 | -------------------------------------------------------------------------------- /spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-drop-mysql.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS SPRING_SESSION_ATTRIBUTES; 2 | DROP TABLE IF EXISTS SPRING_SESSION; 3 | -------------------------------------------------------------------------------- /spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-drop-oracle.sql: -------------------------------------------------------------------------------- 1 | BEGIN 2 | BEGIN 3 | EXECUTE IMMEDIATE 'DROP TABLE SPRING_SESSION_ATTRIBUTES'; 4 | EXCEPTION 5 | WHEN OTHERS THEN 6 | IF SQLCODE != -942 THEN 7 | RAISE; 8 | END IF; 9 | END; 10 | BEGIN 11 | EXECUTE IMMEDIATE 'DROP TABLE SPRING_SESSION'; 12 | EXCEPTION 13 | WHEN OTHERS THEN 14 | IF SQLCODE != -942 THEN 15 | RAISE; 16 | END IF; 17 | END; 18 | END; 19 | -------------------------------------------------------------------------------- /spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-drop-postgresql.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS SPRING_SESSION_ATTRIBUTES; 2 | DROP TABLE IF EXISTS SPRING_SESSION; 3 | -------------------------------------------------------------------------------- /spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-drop-sqlite.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS SPRING_SESSION_ATTRIBUTES; 2 | DROP TABLE IF EXISTS SPRING_SESSION; 3 | -------------------------------------------------------------------------------- /spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-drop-sqlserver.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE SPRING_SESSION_ATTRIBUTES; 2 | DROP TABLE SPRING_SESSION; 3 | -------------------------------------------------------------------------------- /spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-drop-sybase.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE SPRING_SESSION_ATTRIBUTES; 2 | DROP TABLE SPRING_SESSION; 3 | -------------------------------------------------------------------------------- /spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-h2.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE SPRING_SESSION ( 2 | PRIMARY_ID CHAR(36) NOT NULL, 3 | SESSION_ID CHAR(36) NOT NULL, 4 | CREATION_TIME BIGINT NOT NULL, 5 | LAST_ACCESS_TIME BIGINT NOT NULL, 6 | MAX_INACTIVE_INTERVAL INT NOT NULL, 7 | EXPIRY_TIME BIGINT NOT NULL, 8 | PRINCIPAL_NAME VARCHAR(100), 9 | CONSTRAINT SPRING_SESSION_PK PRIMARY KEY (PRIMARY_ID) 10 | ); 11 | 12 | CREATE UNIQUE INDEX SPRING_SESSION_IX1 ON SPRING_SESSION (SESSION_ID); 13 | CREATE INDEX SPRING_SESSION_IX2 ON SPRING_SESSION (EXPIRY_TIME); 14 | CREATE INDEX SPRING_SESSION_IX3 ON SPRING_SESSION (PRINCIPAL_NAME); 15 | 16 | CREATE TABLE SPRING_SESSION_ATTRIBUTES ( 17 | SESSION_PRIMARY_ID CHAR(36) NOT NULL, 18 | ATTRIBUTE_NAME VARCHAR(200) NOT NULL, 19 | ATTRIBUTE_BYTES LONGVARBINARY NOT NULL, 20 | CONSTRAINT SPRING_SESSION_ATTRIBUTES_PK PRIMARY KEY (SESSION_PRIMARY_ID, ATTRIBUTE_NAME), 21 | CONSTRAINT SPRING_SESSION_ATTRIBUTES_FK FOREIGN KEY (SESSION_PRIMARY_ID) REFERENCES SPRING_SESSION(PRIMARY_ID) ON DELETE CASCADE 22 | ); 23 | -------------------------------------------------------------------------------- /spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-hsqldb.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE SPRING_SESSION ( 2 | PRIMARY_ID CHAR(36) NOT NULL, 3 | SESSION_ID CHAR(36) NOT NULL, 4 | CREATION_TIME BIGINT NOT NULL, 5 | LAST_ACCESS_TIME BIGINT NOT NULL, 6 | MAX_INACTIVE_INTERVAL INT NOT NULL, 7 | EXPIRY_TIME BIGINT NOT NULL, 8 | PRINCIPAL_NAME VARCHAR(100), 9 | CONSTRAINT SPRING_SESSION_PK PRIMARY KEY (PRIMARY_ID) 10 | ); 11 | 12 | CREATE UNIQUE INDEX SPRING_SESSION_IX1 ON SPRING_SESSION (SESSION_ID); 13 | CREATE INDEX SPRING_SESSION_IX2 ON SPRING_SESSION (EXPIRY_TIME); 14 | CREATE INDEX SPRING_SESSION_IX3 ON SPRING_SESSION (PRINCIPAL_NAME); 15 | 16 | CREATE TABLE SPRING_SESSION_ATTRIBUTES ( 17 | SESSION_PRIMARY_ID CHAR(36) NOT NULL, 18 | ATTRIBUTE_NAME VARCHAR(200) NOT NULL, 19 | ATTRIBUTE_BYTES LONGVARBINARY NOT NULL, 20 | CONSTRAINT SPRING_SESSION_ATTRIBUTES_PK PRIMARY KEY (SESSION_PRIMARY_ID, ATTRIBUTE_NAME), 21 | CONSTRAINT SPRING_SESSION_ATTRIBUTES_FK FOREIGN KEY (SESSION_PRIMARY_ID) REFERENCES SPRING_SESSION(PRIMARY_ID) ON DELETE CASCADE 22 | ); 23 | -------------------------------------------------------------------------------- /spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-mysql.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE SPRING_SESSION ( 2 | PRIMARY_ID CHAR(36) NOT NULL, 3 | SESSION_ID CHAR(36) NOT NULL, 4 | CREATION_TIME BIGINT NOT NULL, 5 | LAST_ACCESS_TIME BIGINT NOT NULL, 6 | MAX_INACTIVE_INTERVAL INT NOT NULL, 7 | EXPIRY_TIME BIGINT NOT NULL, 8 | PRINCIPAL_NAME VARCHAR(100), 9 | CONSTRAINT SPRING_SESSION_PK PRIMARY KEY (PRIMARY_ID) 10 | ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; 11 | 12 | CREATE UNIQUE INDEX SPRING_SESSION_IX1 ON SPRING_SESSION (SESSION_ID); 13 | CREATE INDEX SPRING_SESSION_IX2 ON SPRING_SESSION (EXPIRY_TIME); 14 | CREATE INDEX SPRING_SESSION_IX3 ON SPRING_SESSION (PRINCIPAL_NAME); 15 | 16 | CREATE TABLE SPRING_SESSION_ATTRIBUTES ( 17 | SESSION_PRIMARY_ID CHAR(36) NOT NULL, 18 | ATTRIBUTE_NAME VARCHAR(200) NOT NULL, 19 | ATTRIBUTE_BYTES BLOB NOT NULL, 20 | CONSTRAINT SPRING_SESSION_ATTRIBUTES_PK PRIMARY KEY (SESSION_PRIMARY_ID, ATTRIBUTE_NAME), 21 | CONSTRAINT SPRING_SESSION_ATTRIBUTES_FK FOREIGN KEY (SESSION_PRIMARY_ID) REFERENCES SPRING_SESSION(PRIMARY_ID) ON DELETE CASCADE 22 | ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; 23 | -------------------------------------------------------------------------------- /spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-oracle.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE SPRING_SESSION ( 2 | PRIMARY_ID CHAR(36) NOT NULL, 3 | SESSION_ID CHAR(36) NOT NULL, 4 | CREATION_TIME NUMBER(19,0) NOT NULL, 5 | LAST_ACCESS_TIME NUMBER(19,0) NOT NULL, 6 | MAX_INACTIVE_INTERVAL NUMBER(10,0) NOT NULL, 7 | EXPIRY_TIME NUMBER(19,0) NOT NULL, 8 | PRINCIPAL_NAME VARCHAR2(100 CHAR), 9 | CONSTRAINT SPRING_SESSION_PK PRIMARY KEY (PRIMARY_ID) 10 | ); 11 | 12 | CREATE UNIQUE INDEX SPRING_SESSION_IX1 ON SPRING_SESSION (SESSION_ID); 13 | CREATE INDEX SPRING_SESSION_IX2 ON SPRING_SESSION (EXPIRY_TIME); 14 | CREATE INDEX SPRING_SESSION_IX3 ON SPRING_SESSION (PRINCIPAL_NAME); 15 | 16 | CREATE TABLE SPRING_SESSION_ATTRIBUTES ( 17 | SESSION_PRIMARY_ID CHAR(36) NOT NULL, 18 | ATTRIBUTE_NAME VARCHAR2(200 CHAR) NOT NULL, 19 | ATTRIBUTE_BYTES BLOB NOT NULL, 20 | CONSTRAINT SPRING_SESSION_ATTRIBUTES_PK PRIMARY KEY (SESSION_PRIMARY_ID, ATTRIBUTE_NAME), 21 | CONSTRAINT SPRING_SESSION_ATTRIBUTES_FK FOREIGN KEY (SESSION_PRIMARY_ID) REFERENCES SPRING_SESSION(PRIMARY_ID) ON DELETE CASCADE 22 | ); 23 | -------------------------------------------------------------------------------- /spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-postgresql.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE SPRING_SESSION ( 2 | PRIMARY_ID CHAR(36) NOT NULL, 3 | SESSION_ID CHAR(36) NOT NULL, 4 | CREATION_TIME BIGINT NOT NULL, 5 | LAST_ACCESS_TIME BIGINT NOT NULL, 6 | MAX_INACTIVE_INTERVAL INT NOT NULL, 7 | EXPIRY_TIME BIGINT NOT NULL, 8 | PRINCIPAL_NAME VARCHAR(100), 9 | CONSTRAINT SPRING_SESSION_PK PRIMARY KEY (PRIMARY_ID) 10 | ); 11 | 12 | CREATE UNIQUE INDEX SPRING_SESSION_IX1 ON SPRING_SESSION (SESSION_ID); 13 | CREATE INDEX SPRING_SESSION_IX2 ON SPRING_SESSION (EXPIRY_TIME); 14 | CREATE INDEX SPRING_SESSION_IX3 ON SPRING_SESSION (PRINCIPAL_NAME); 15 | 16 | CREATE TABLE SPRING_SESSION_ATTRIBUTES ( 17 | SESSION_PRIMARY_ID CHAR(36) NOT NULL, 18 | ATTRIBUTE_NAME VARCHAR(200) NOT NULL, 19 | ATTRIBUTE_BYTES BYTEA NOT NULL, 20 | CONSTRAINT SPRING_SESSION_ATTRIBUTES_PK PRIMARY KEY (SESSION_PRIMARY_ID, ATTRIBUTE_NAME), 21 | CONSTRAINT SPRING_SESSION_ATTRIBUTES_FK FOREIGN KEY (SESSION_PRIMARY_ID) REFERENCES SPRING_SESSION(PRIMARY_ID) ON DELETE CASCADE 22 | ); 23 | -------------------------------------------------------------------------------- /spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-sqlite.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE SPRING_SESSION ( 2 | PRIMARY_ID CHARACTER(36) NOT NULL, 3 | SESSION_ID CHARACTER(36) NOT NULL, 4 | CREATION_TIME INTEGER NOT NULL, 5 | LAST_ACCESS_TIME INTEGER NOT NULL, 6 | MAX_INACTIVE_INTERVAL INTEGER NOT NULL, 7 | EXPIRY_TIME INTEGER NOT NULL, 8 | PRINCIPAL_NAME VARCHAR(100), 9 | CONSTRAINT SPRING_SESSION_PK PRIMARY KEY (PRIMARY_ID) 10 | ); 11 | 12 | CREATE UNIQUE INDEX SPRING_SESSION_IX1 ON SPRING_SESSION (SESSION_ID); 13 | CREATE INDEX SPRING_SESSION_IX2 ON SPRING_SESSION (EXPIRY_TIME); 14 | CREATE INDEX SPRING_SESSION_IX3 ON SPRING_SESSION (PRINCIPAL_NAME); 15 | 16 | CREATE TABLE SPRING_SESSION_ATTRIBUTES ( 17 | SESSION_PRIMARY_ID CHAR(36) NOT NULL, 18 | ATTRIBUTE_NAME VARCHAR(200) NOT NULL, 19 | ATTRIBUTE_BYTES BLOB NOT NULL, 20 | CONSTRAINT SPRING_SESSION_ATTRIBUTES_PK PRIMARY KEY (SESSION_PRIMARY_ID, ATTRIBUTE_NAME), 21 | CONSTRAINT SPRING_SESSION_ATTRIBUTES_FK FOREIGN KEY (SESSION_PRIMARY_ID) REFERENCES SPRING_SESSION(PRIMARY_ID) ON DELETE CASCADE 22 | ); 23 | -------------------------------------------------------------------------------- /spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-sqlserver.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE SPRING_SESSION ( 2 | PRIMARY_ID CHAR(36) NOT NULL, 3 | SESSION_ID CHAR(36) NOT NULL, 4 | CREATION_TIME BIGINT NOT NULL, 5 | LAST_ACCESS_TIME BIGINT NOT NULL, 6 | MAX_INACTIVE_INTERVAL INT NOT NULL, 7 | EXPIRY_TIME BIGINT NOT NULL, 8 | PRINCIPAL_NAME VARCHAR(100), 9 | CONSTRAINT SPRING_SESSION_PK PRIMARY KEY (PRIMARY_ID) 10 | ); 11 | 12 | CREATE UNIQUE INDEX SPRING_SESSION_IX1 ON SPRING_SESSION (SESSION_ID); 13 | CREATE INDEX SPRING_SESSION_IX2 ON SPRING_SESSION (EXPIRY_TIME); 14 | CREATE INDEX SPRING_SESSION_IX3 ON SPRING_SESSION (PRINCIPAL_NAME); 15 | 16 | CREATE TABLE SPRING_SESSION_ATTRIBUTES ( 17 | SESSION_PRIMARY_ID CHAR(36) NOT NULL, 18 | ATTRIBUTE_NAME VARCHAR(200) NOT NULL, 19 | ATTRIBUTE_BYTES IMAGE NOT NULL, 20 | CONSTRAINT SPRING_SESSION_ATTRIBUTES_PK PRIMARY KEY (SESSION_PRIMARY_ID, ATTRIBUTE_NAME), 21 | CONSTRAINT SPRING_SESSION_ATTRIBUTES_FK FOREIGN KEY (SESSION_PRIMARY_ID) REFERENCES SPRING_SESSION(PRIMARY_ID) ON DELETE CASCADE 22 | ); 23 | -------------------------------------------------------------------------------- /spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-sybase.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE SPRING_SESSION ( 2 | PRIMARY_ID CHAR(36) NOT NULL, 3 | SESSION_ID CHAR(36) NOT NULL, 4 | CREATION_TIME BIGINT NOT NULL, 5 | LAST_ACCESS_TIME BIGINT NOT NULL, 6 | MAX_INACTIVE_INTERVAL INT NOT NULL, 7 | EXPIRY_TIME BIGINT NOT NULL, 8 | PRINCIPAL_NAME VARCHAR(100), 9 | CONSTRAINT SPRING_SESSION_PK PRIMARY KEY (PRIMARY_ID) 10 | ) LOCK DATAROWS; 11 | 12 | CREATE UNIQUE INDEX SPRING_SESSION_IX1 ON SPRING_SESSION (SESSION_ID); 13 | CREATE INDEX SPRING_SESSION_IX2 ON SPRING_SESSION (EXPIRY_TIME); 14 | CREATE INDEX SPRING_SESSION_IX3 ON SPRING_SESSION (PRINCIPAL_NAME); 15 | 16 | CREATE TABLE SPRING_SESSION_ATTRIBUTES ( 17 | SESSION_PRIMARY_ID CHAR(36) NOT NULL, 18 | ATTRIBUTE_NAME VARCHAR(200) NOT NULL, 19 | ATTRIBUTE_BYTES IMAGE NOT NULL, 20 | CONSTRAINT SPRING_SESSION_ATTRIBUTES_PK PRIMARY KEY (SESSION_PRIMARY_ID, ATTRIBUTE_NAME), 21 | CONSTRAINT SPRING_SESSION_ATTRIBUTES_FK FOREIGN KEY (SESSION_PRIMARY_ID) REFERENCES SPRING_SESSION(PRIMARY_ID) ON DELETE CASCADE 22 | ) LOCK DATAROWS; 23 | -------------------------------------------------------------------------------- /spring-session-jdbc/src/test/java/org/springframework/session/jdbc/FixedSessionIdGenerator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.session.jdbc; 18 | 19 | import org.springframework.session.SessionIdGenerator; 20 | 21 | public class FixedSessionIdGenerator implements SessionIdGenerator { 22 | 23 | private final String id; 24 | 25 | public FixedSessionIdGenerator(String id) { 26 | this.id = id; 27 | } 28 | 29 | @Override 30 | public String generate() { 31 | return this.id; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /spring-session-samples/gradle/dependency-management.gradle: -------------------------------------------------------------------------------- 1 | def versionCatalog = extensions.getByType(VersionCatalogsExtension).named("libs") 2 | def springBootVersion = versionCatalog.findVersion("org-springframework-boot").get().displayName 3 | 4 | dependencyManagement { 5 | imports { 6 | mavenBom "org.springframework.boot:spring-boot-dependencies:$springBootVersion" 7 | } 8 | 9 | dependencies { 10 | dependency 'com.maxmind.geoip2:geoip2:2.16.1' 11 | dependency 'org.webjars:bootstrap:2.3.2' 12 | dependency 'org.webjars:html5shiv:3.7.3-1' 13 | dependency 'org.webjars:jquery:3.6.0' 14 | dependency 'org.webjars:knockout:3.5.1' 15 | dependency 'org.webjars:sockjs-client:1.5.1' 16 | dependency 'org.webjars:stomp-websocket:2.3.4' 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-findbyusername/src/integration-test/java/sample/pages/BasePage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample.pages; 18 | 19 | import org.openqa.selenium.WebDriver; 20 | 21 | /** 22 | * @author Eddú Meléndez 23 | */ 24 | public class BasePage { 25 | 26 | private WebDriver driver; 27 | 28 | public BasePage(WebDriver driver) { 29 | this.driver = driver; 30 | } 31 | 32 | public WebDriver getDriver() { 33 | return this.driver; 34 | } 35 | 36 | public static void get(WebDriver driver, String get) { 37 | String baseUrl = "http://localhost"; 38 | driver.get(baseUrl + get); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-findbyusername/src/integration-test/resources/testcontainers.properties: -------------------------------------------------------------------------------- 1 | ryuk.container.timeout=120 2 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-findbyusername/src/main/java/sample/FindByUsernameApplication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample; 18 | 19 | import org.springframework.boot.SpringApplication; 20 | import org.springframework.boot.autoconfigure.SpringBootApplication; 21 | 22 | /** 23 | * @author Rob Winch 24 | */ 25 | @SpringBootApplication 26 | public class FindByUsernameApplication { 27 | 28 | public static void main(String[] args) { 29 | SpringApplication.run(FindByUsernameApplication.class, args); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-findbyusername/src/main/java/sample/config/WebMvcConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample.config; 18 | 19 | import org.springframework.context.annotation.Configuration; 20 | import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; 21 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 22 | 23 | @Configuration 24 | public class WebMvcConfig implements WebMvcConfigurer { 25 | 26 | @Override 27 | public void addViewControllers(ViewControllerRegistry registry) { 28 | registry.addViewController("/login").setViewName("login"); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-findbyusername/src/main/resources/GeoLite2-City.mmdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-boot-findbyusername/src/main/resources/GeoLite2-City.mmdb -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-findbyusername/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.security.user.password=password 2 | spring.session.redis.repository-type=indexed 3 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-findbyusername/src/main/resources/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-boot-findbyusername/src/main/resources/static/favicon.ico -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-findbyusername/src/main/resources/static/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-boot-findbyusername/src/main/resources/static/images/logo.png -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-hazelcast/spring-session-sample-boot-hazelcast.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'io.spring.convention.spring-sample-boot' 2 | 3 | dependencies { 4 | management platform(project(":spring-session-dependencies")) 5 | implementation project(':spring-session-hazelcast') 6 | implementation "org.springframework.boot:spring-boot-starter-web" 7 | implementation "org.springframework.boot:spring-boot-starter-actuator" 8 | implementation "org.springframework.boot:spring-boot-starter-thymeleaf" 9 | implementation "org.springframework.boot:spring-boot-starter-security" 10 | implementation "com.hazelcast:hazelcast" 11 | implementation "nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect" 12 | implementation "org.webjars:bootstrap" 13 | implementation "org.webjars:html5shiv" 14 | implementation "org.webjars:webjars-locator-core" 15 | 16 | testImplementation "org.springframework.boot:spring-boot-starter-test" 17 | testImplementation "org.junit.jupiter:junit-jupiter-api" 18 | 19 | testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine" 20 | testRuntimeOnly "org.junit.platform:junit-platform-launcher" 21 | 22 | integrationTestCompile "org.htmlunit:htmlunit" 23 | integrationTestCompile "org.seleniumhq.selenium:htmlunit3-driver" 24 | } 25 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-hazelcast/src/integration-test/java/sample/pages/BasePage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2020 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample.pages; 18 | 19 | import org.openqa.selenium.WebDriver; 20 | 21 | /** 22 | * @author Ellie Bahadori 23 | */ 24 | public class BasePage { 25 | 26 | private WebDriver driver; 27 | 28 | public BasePage(WebDriver driver) { 29 | this.driver = driver; 30 | } 31 | 32 | public WebDriver getDriver() { 33 | return this.driver; 34 | } 35 | 36 | public static void get(WebDriver driver, String get) { 37 | String baseUrl = "http://localhost"; 38 | driver.get(baseUrl + get); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-hazelcast/src/integration-test/resources/testcontainers.properties: -------------------------------------------------------------------------------- 1 | ryuk.container.timeout=120 2 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-hazelcast/src/main/java/sample/Application.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2020 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample; 18 | 19 | import org.springframework.boot.SpringApplication; 20 | import org.springframework.boot.autoconfigure.SpringBootApplication; 21 | import org.springframework.cache.annotation.EnableCaching; 22 | 23 | /** 24 | * @author Ellie Bahadori 25 | */ 26 | @EnableCaching 27 | @SpringBootApplication 28 | public class Application { 29 | 30 | public static void main(String[] args) { 31 | SpringApplication.run(Application.class, args); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-hazelcast/src/main/java/sample/config/IndexController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2020 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample.config; 18 | 19 | import org.springframework.stereotype.Controller; 20 | import org.springframework.web.bind.annotation.RequestMapping; 21 | 22 | @Controller 23 | public class IndexController { 24 | 25 | @RequestMapping("/") 26 | public String index() { 27 | return "index"; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-hazelcast/src/main/java/sample/config/UserControllerAdvise.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample.config; 18 | 19 | import java.security.Principal; 20 | 21 | import org.springframework.web.bind.annotation.ControllerAdvice; 22 | import org.springframework.web.bind.annotation.ModelAttribute; 23 | 24 | /** 25 | * {@link ControllerAdvice} to expose user related attributes. 26 | * 27 | * @author Rob Winch 28 | */ 29 | @ControllerAdvice 30 | public class UserControllerAdvise { 31 | 32 | @ModelAttribute("currentUserName") 33 | String currentUser(Principal principal) { 34 | return (principal != null) ? principal.getName() : null; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-hazelcast/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | management.endpoints.web.exposure.include=sessions 2 | spring.security.user.password=password 3 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-hazelcast/src/main/resources/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-boot-hazelcast/src/main/resources/static/favicon.ico -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-hazelcast/src/main/resources/static/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-boot-hazelcast/src/main/resources/static/images/logo.png -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-hazelcast/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Secured Content 4 | 5 | 6 |
7 |

Secured Page

8 |

This page is secured using Spring Boot, Spring Session, and Spring Security.

9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-jdbc-json-attribute/src/main/java/sample/IndexController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample; 18 | 19 | import org.springframework.stereotype.Controller; 20 | import org.springframework.web.bind.annotation.RequestMapping; 21 | 22 | /** 23 | * Controller for sending the user to the login view. 24 | * 25 | * @author Rob Winch 26 | * 27 | */ 28 | @Controller 29 | public class IndexController { 30 | 31 | @RequestMapping("/") 32 | public String index() { 33 | return "index"; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-jdbc-json-attribute/src/main/java/sample/JdbcJsonAttributeApplication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample; 18 | 19 | import org.springframework.boot.SpringApplication; 20 | import org.springframework.boot.autoconfigure.SpringBootApplication; 21 | 22 | /** 23 | * @author Rob Winch 24 | */ 25 | @SpringBootApplication 26 | public class JdbcJsonAttributeApplication { 27 | 28 | public static void main(String[] args) { 29 | SpringApplication.run(JdbcJsonAttributeApplication.class, args); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-jdbc-json-attribute/src/main/java/sample/UserControllerAdvise.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample; 18 | 19 | import java.security.Principal; 20 | 21 | import org.springframework.web.bind.annotation.ControllerAdvice; 22 | import org.springframework.web.bind.annotation.ModelAttribute; 23 | 24 | /** 25 | * {@link ControllerAdvice} to expose security related attributes. 26 | * 27 | * @author Rob Winch 28 | */ 29 | @ControllerAdvice 30 | public class UserControllerAdvise { 31 | 32 | @ModelAttribute("currentUserName") 33 | String currentUser(Principal principal) { 34 | return (principal != null) ? principal.getName() : null; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-jdbc-json-attribute/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.security.user.password=password 2 | spring.session.jdbc.schema=classpath:schema.sql 3 | spring.session.jdbc.initialize-schema=always 4 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-jdbc-json-attribute/src/main/resources/schema.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE SPRING_SESSION 2 | ( 3 | PRIMARY_ID CHAR(36) NOT NULL, 4 | SESSION_ID CHAR(36) NOT NULL, 5 | CREATION_TIME BIGINT NOT NULL, 6 | LAST_ACCESS_TIME BIGINT NOT NULL, 7 | MAX_INACTIVE_INTERVAL INT NOT NULL, 8 | EXPIRY_TIME BIGINT NOT NULL, 9 | PRINCIPAL_NAME VARCHAR(100), 10 | CONSTRAINT SPRING_SESSION_PK PRIMARY KEY (PRIMARY_ID) 11 | ); 12 | 13 | CREATE UNIQUE INDEX SPRING_SESSION_IX1 ON SPRING_SESSION (SESSION_ID); 14 | CREATE INDEX SPRING_SESSION_IX2 ON SPRING_SESSION (EXPIRY_TIME); 15 | CREATE INDEX SPRING_SESSION_IX3 ON SPRING_SESSION (PRINCIPAL_NAME); 16 | 17 | CREATE TABLE SPRING_SESSION_ATTRIBUTES 18 | ( 19 | SESSION_PRIMARY_ID CHAR(36) NOT NULL, 20 | ATTRIBUTE_NAME VARCHAR(200) NOT NULL, 21 | ATTRIBUTE_BYTES JSONB NOT NULL, 22 | CONSTRAINT SPRING_SESSION_ATTRIBUTES_PK PRIMARY KEY (SESSION_PRIMARY_ID, ATTRIBUTE_NAME), 23 | CONSTRAINT SPRING_SESSION_ATTRIBUTES_FK FOREIGN KEY (SESSION_PRIMARY_ID) REFERENCES SPRING_SESSION (PRIMARY_ID) ON DELETE CASCADE 24 | ); 25 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-jdbc-json-attribute/src/main/resources/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-boot-jdbc-json-attribute/src/main/resources/static/favicon.ico -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-jdbc-json-attribute/src/main/resources/static/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-boot-jdbc-json-attribute/src/main/resources/static/images/logo.png -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-jdbc-json-attribute/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Secured Content 4 | 5 | 6 |
7 |

Secured Page

8 |

This page is secured using Spring Boot, Spring Session, and Spring Security.

9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-jdbc-json-attribute/src/test/java/sample/JdbcJsonAttributeTestApplication.java: -------------------------------------------------------------------------------- 1 | package sample; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | 5 | public class JdbcJsonAttributeTestApplication { 6 | 7 | public static void main(String[] args) { 8 | SpringApplication.from(JdbcJsonAttributeApplication::main).with(TestContainersConfig.class).run(args); 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-jdbc-json-attribute/src/test/java/sample/JdbcJsonSpecialCharsAttributeTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample; 18 | 19 | import org.springframework.test.context.TestPropertySource; 20 | 21 | /** 22 | * Test that special characters in usernames work. 23 | * 24 | * @author Rob Winch 25 | */ 26 | @TestPropertySource(properties = "spring.security.user.name=rüdiger") 27 | class JdbcJsonSpecialCharsAttributeTests extends JdbcJsonAttributeTests { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-jdbc/spring-session-sample-boot-jdbc.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'io.spring.convention.spring-sample-boot' 2 | 3 | dependencies { 4 | management platform(project(":spring-session-dependencies")) 5 | implementation project(':spring-session-jdbc') 6 | implementation "org.springframework.boot:spring-boot-starter-web" 7 | implementation "org.springframework.boot:spring-boot-starter-thymeleaf" 8 | implementation "org.springframework.boot:spring-boot-starter-security" 9 | implementation "org.springframework.boot:spring-boot-devtools" 10 | implementation "nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect" 11 | implementation "org.webjars:bootstrap" 12 | implementation "org.webjars:html5shiv" 13 | implementation "org.webjars:webjars-locator-core" 14 | implementation "com.h2database:h2" 15 | 16 | testImplementation "org.springframework.boot:spring-boot-starter-test" 17 | testImplementation "org.assertj:assertj-core" 18 | testImplementation "org.junit.jupiter:junit-jupiter-api" 19 | 20 | testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine" 21 | testRuntimeOnly "org.junit.platform:junit-platform-launcher" 22 | 23 | integrationTestCompile "org.htmlunit:htmlunit" 24 | integrationTestCompile "org.seleniumhq.selenium:htmlunit3-driver" 25 | } 26 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-jdbc/src/integration-test/java/sample/pages/BasePage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample.pages; 18 | 19 | import org.openqa.selenium.WebDriver; 20 | 21 | /** 22 | * @author Eddú Meléndez 23 | */ 24 | public class BasePage { 25 | 26 | private WebDriver driver; 27 | 28 | public BasePage(WebDriver driver) { 29 | this.driver = driver; 30 | } 31 | 32 | public WebDriver getDriver() { 33 | return this.driver; 34 | } 35 | 36 | public static void get(WebDriver driver, String get) { 37 | String baseUrl = "http://localhost"; 38 | driver.get(baseUrl + get); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-jdbc/src/main/java/sample/Application.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample; 18 | 19 | import org.springframework.boot.SpringApplication; 20 | import org.springframework.boot.autoconfigure.SpringBootApplication; 21 | 22 | /** 23 | * @author Rob Winch 24 | */ 25 | @SpringBootApplication 26 | public class Application { 27 | 28 | public static void main(String[] args) { 29 | SpringApplication.run(Application.class, args); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-jdbc/src/main/java/sample/IndexController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample; 18 | 19 | import org.springframework.stereotype.Controller; 20 | import org.springframework.web.bind.annotation.RequestMapping; 21 | 22 | /** 23 | * Controller for sending the user to the login view. 24 | * 25 | * @author Rob Winch 26 | * 27 | */ 28 | @Controller 29 | public class IndexController { 30 | 31 | @RequestMapping("/") 32 | public String index() { 33 | return "index"; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-jdbc/src/main/java/sample/UserControllerAdvise.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample; 18 | 19 | import java.security.Principal; 20 | 21 | import org.springframework.web.bind.annotation.ControllerAdvice; 22 | import org.springframework.web.bind.annotation.ModelAttribute; 23 | 24 | /** 25 | * {@link ControllerAdvice} to expose security related attributes. 26 | * 27 | * @author Rob Winch 28 | */ 29 | @ControllerAdvice 30 | public class UserControllerAdvise { 31 | 32 | @ModelAttribute("currentUserName") 33 | String currentUser(Principal principal) { 34 | return (principal != null) ? principal.getName() : null; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-jdbc/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.security.user.password=password 2 | spring.h2.console.enabled=true 3 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-jdbc/src/main/resources/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-boot-jdbc/src/main/resources/static/favicon.ico -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-jdbc/src/main/resources/static/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-boot-jdbc/src/main/resources/static/images/logo.png -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-jdbc/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Secured Content 4 | 5 | 6 |
7 |

Secured Page

8 |

This page is secured using Spring Boot, Spring Session, and Spring Security.

9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-mongodb-reactive/spring-session-sample-boot-mongodb-reactive.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'io.spring.convention.spring-sample-boot' 2 | 3 | dependencies { 4 | management platform(project(":spring-session-dependencies")) 5 | implementation project(':spring-session-data-mongodb') 6 | implementation "org.springframework.boot:spring-boot-starter-webflux" 7 | implementation "org.springframework.boot:spring-boot-starter-thymeleaf" 8 | implementation "org.springframework.boot:spring-boot-starter-data-mongodb-reactive" 9 | implementation "org.springframework.boot:spring-boot-testcontainers" 10 | implementation "org.testcontainers:mongodb" 11 | 12 | testImplementation "org.springframework.boot:spring-boot-starter-test" 13 | testImplementation "org.htmlunit:htmlunit" 14 | testImplementation "org.seleniumhq.selenium:htmlunit3-driver" 15 | 16 | testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine" 17 | testRuntimeOnly "org.junit.platform:junit-platform-launcher" 18 | } 19 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-mongodb-reactive/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | logging.level.org.springframework.data.mongodb=DEBUG 2 | logging.level.org.springframework.session=DEBUG 3 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-mongodb-traditional/spring-session-sample-boot-mongodb-traditional.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'io.spring.convention.spring-sample-boot' 2 | 3 | dependencies { 4 | management platform(project(":spring-session-dependencies")) 5 | implementation project(':spring-session-data-mongodb') 6 | implementation "org.springframework.boot:spring-boot-starter-web" 7 | implementation "org.springframework.boot:spring-boot-starter-thymeleaf" 8 | implementation "nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect" 9 | implementation "org.thymeleaf.extras:thymeleaf-extras-springsecurity6" 10 | implementation "org.springframework.boot:spring-boot-starter-data-mongodb" 11 | implementation "org.springframework.boot:spring-boot-starter-security" 12 | implementation "org.springframework.boot:spring-boot-testcontainers" 13 | implementation "org.testcontainers:mongodb" 14 | 15 | testImplementation "org.springframework.boot:spring-boot-starter-test" 16 | testImplementation "org.htmlunit:htmlunit" 17 | testImplementation "org.seleniumhq.selenium:htmlunit3-driver" 18 | testImplementation "org.springframework.security:spring-security-test" 19 | 20 | testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine" 21 | testRuntimeOnly "org.junit.platform:junit-platform-launcher" 22 | } 23 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-mongodb-traditional/src/main/java/org/springframework/session/mongodb/examples/SpringSessionMongoTraditionalBoot.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.session.mongodb.examples; 18 | 19 | import org.springframework.boot.SpringApplication; 20 | import org.springframework.boot.autoconfigure.SpringBootApplication; 21 | 22 | /** 23 | * @author Rob Winch 24 | * @author Yanming Zhou 25 | */ 26 | @SpringBootApplication 27 | public class SpringSessionMongoTraditionalBoot { 28 | 29 | public static void main(String[] args) { 30 | SpringApplication.run(SpringSessionMongoTraditionalBoot.class, args); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-mongodb-traditional/src/main/java/org/springframework/session/mongodb/examples/mvc/IndexController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2016 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.session.mongodb.examples.mvc; 18 | 19 | import org.springframework.stereotype.Controller; 20 | import org.springframework.web.bind.annotation.GetMapping; 21 | 22 | /** 23 | * Controller for sending the user to the login view. 24 | * 25 | * @author Rob Winch 26 | * 27 | */ 28 | @Controller 29 | public class IndexController { 30 | 31 | @GetMapping("/") 32 | public String index() { 33 | return "index"; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-mongodb-traditional/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.thymeleaf.cache=false 2 | spring.security.user.password=password 3 | 4 | logging.level.org.springframework.data.mongodb=DEBUG 5 | logging.level.org.springframework.session=DEBUG 6 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-mongodb-traditional/src/main/resources/static/resources/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-boot-mongodb-traditional/src/main/resources/static/resources/img/favicon.ico -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-mongodb-traditional/src/main/resources/static/resources/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-boot-mongodb-traditional/src/main/resources/static/resources/img/logo.png -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-mongodb-traditional/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Secured Content 4 | 5 | 6 |
7 |

Secured Page

8 |

This page is secured using Spring Boot, Spring Session, and Spring Security.

9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-reactive-max-sessions/spring-session-sample-boot-reactive-max-sessions.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'io.spring.convention.spring-sample-boot' 2 | 3 | ext['spring-security.version'] = '6.3.0-SNAPSHOT' 4 | 5 | dependencies { 6 | management platform(project(":spring-session-dependencies")) 7 | implementation project(':spring-session-data-redis') 8 | implementation 'org.springframework.boot:spring-boot-starter-data-redis-reactive' 9 | implementation 'org.springframework.boot:spring-boot-starter-security' 10 | implementation 'org.springframework.boot:spring-boot-starter-webflux' 11 | implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' 12 | testImplementation 'org.springframework.boot:spring-boot-starter-test' 13 | testImplementation 'io.projectreactor:reactor-test' 14 | testImplementation 'org.springframework.security:spring-security-test' 15 | testImplementation 'org.springframework.boot:spring-boot-testcontainers' 16 | testImplementation 'com.redis:testcontainers-redis' 17 | testImplementation "org.htmlunit:htmlunit" 18 | testImplementation "org.seleniumhq.selenium:htmlunit3-driver" 19 | 20 | testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine" 21 | testRuntimeOnly "org.junit.platform:junit-platform-launcher" 22 | } 23 | 24 | tasks.named('test') { 25 | useJUnitPlatform() 26 | } 27 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-reactive-max-sessions/src/main/java/com/example/HelloController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example; 18 | 19 | import reactor.core.publisher.Mono; 20 | 21 | import org.springframework.web.bind.annotation.GetMapping; 22 | import org.springframework.web.bind.annotation.RestController; 23 | 24 | @RestController 25 | class HelloController { 26 | 27 | @GetMapping("/hello") 28 | Mono hello() { 29 | return Mono.just("Hello!"); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-reactive-max-sessions/src/main/java/com/example/SessionConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example; 18 | 19 | import org.springframework.context.annotation.Configuration; 20 | import org.springframework.session.data.redis.config.annotation.web.server.EnableRedisIndexedWebSession; 21 | 22 | @Configuration(proxyBeanMethods = false) 23 | @EnableRedisIndexedWebSession 24 | public class SessionConfig { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-reactive-max-sessions/src/main/java/com/example/SpringSessionSampleBootReactiveMaxSessions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example; 18 | 19 | import org.springframework.boot.SpringApplication; 20 | import org.springframework.boot.autoconfigure.SpringBootApplication; 21 | 22 | @SpringBootApplication 23 | public class SpringSessionSampleBootReactiveMaxSessions { 24 | 25 | public static void main(String[] args) { 26 | SpringApplication.run(SpringSessionSampleBootReactiveMaxSessions.class, args); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-reactive-max-sessions/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-reactive-max-sessions/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Secured Content 4 | 5 | 6 |
7 |

Secured Page

8 |

This page is secured using Spring Boot, Spring Session, and Spring Security.

9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-reactive-max-sessions/src/test/java/com/example/BasePage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example; 18 | 19 | import org.openqa.selenium.WebDriver; 20 | 21 | /** 22 | * @author Eddú Meléndez 23 | */ 24 | public class BasePage { 25 | 26 | private WebDriver driver; 27 | 28 | public BasePage(WebDriver driver) { 29 | this.driver = driver; 30 | } 31 | 32 | public WebDriver getDriver() { 33 | return this.driver; 34 | } 35 | 36 | public static void get(WebDriver driver, String get) { 37 | String baseUrl = "http://localhost"; 38 | driver.get(baseUrl + get); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-reactive-max-sessions/src/test/java/com/example/TestApplication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example; 18 | 19 | import org.springframework.boot.SpringApplication; 20 | import org.springframework.boot.test.context.TestConfiguration; 21 | 22 | @TestConfiguration(proxyBeanMethods = false) 23 | public class TestApplication { 24 | 25 | public static void main(String[] args) { 26 | SpringApplication.from(SpringSessionSampleBootReactiveMaxSessions::main) 27 | .with(TestcontainersConfig.class) 28 | .run(args); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-reactive-redis-indexed/spring-session-sample-boot-reactive-redis-indexed.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'io.spring.convention.spring-sample-boot' 2 | 3 | dependencies { 4 | management platform(project(":spring-session-dependencies")) 5 | implementation project(':spring-session-data-redis') 6 | implementation 'org.springframework.boot:spring-boot-starter-data-redis-reactive' 7 | implementation 'org.springframework.boot:spring-boot-starter-security' 8 | implementation 'org.springframework.boot:spring-boot-starter-webflux' 9 | implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' 10 | testImplementation 'org.springframework.boot:spring-boot-starter-test' 11 | testImplementation 'io.projectreactor:reactor-test' 12 | testImplementation 'org.springframework.security:spring-security-test' 13 | testImplementation 'org.springframework.boot:spring-boot-testcontainers' 14 | testImplementation 'com.redis:testcontainers-redis' 15 | testImplementation "org.htmlunit:htmlunit" 16 | testImplementation "org.seleniumhq.selenium:htmlunit3-driver" 17 | 18 | testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine" 19 | testRuntimeOnly "org.junit.platform:junit-platform-launcher" 20 | } 21 | 22 | tasks.named('test') { 23 | useJUnitPlatform() 24 | } 25 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-reactive-redis-indexed/src/main/java/com/example/SessionConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example; 18 | 19 | import org.springframework.context.annotation.Configuration; 20 | import org.springframework.session.data.redis.config.annotation.web.server.EnableRedisIndexedWebSession; 21 | 22 | @Configuration(proxyBeanMethods = false) 23 | @EnableRedisIndexedWebSession 24 | public class SessionConfig { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-reactive-redis-indexed/src/main/java/com/example/SpringSessionSampleBootReactiveRedisIndexedApplication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example; 18 | 19 | import org.springframework.boot.SpringApplication; 20 | import org.springframework.boot.autoconfigure.SpringBootApplication; 21 | 22 | @SpringBootApplication 23 | public class SpringSessionSampleBootReactiveRedisIndexedApplication { 24 | 25 | public static void main(String[] args) { 26 | SpringApplication.run(SpringSessionSampleBootReactiveRedisIndexedApplication.class, args); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-reactive-redis-indexed/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-reactive-redis-indexed/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Secured Content 4 | 5 | 6 |
7 |

Secured Page

8 |

This page is secured using Spring Boot, Spring Session, and Spring Security.

9 | 10 | 11 | 12 | 13 |
14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-reactive-redis-indexed/src/test/java/com/example/BasePage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example; 18 | 19 | import org.openqa.selenium.WebDriver; 20 | 21 | /** 22 | * @author Eddú Meléndez 23 | */ 24 | public class BasePage { 25 | 26 | private WebDriver driver; 27 | 28 | public BasePage(WebDriver driver) { 29 | this.driver = driver; 30 | } 31 | 32 | public WebDriver getDriver() { 33 | return this.driver; 34 | } 35 | 36 | public static void get(WebDriver driver, String get) { 37 | String baseUrl = "http://localhost"; 38 | driver.get(baseUrl + get); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-reactive-redis-indexed/src/test/java/com/example/SpringSessionSampleBootReactiveRedisIndexedApplicationTestApplication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.example; 18 | 19 | import org.springframework.boot.SpringApplication; 20 | import org.springframework.boot.test.context.TestConfiguration; 21 | 22 | @TestConfiguration(proxyBeanMethods = false) 23 | public class SpringSessionSampleBootReactiveRedisIndexedApplicationTestApplication { 24 | 25 | public static void main(String[] args) { 26 | SpringApplication.from(SpringSessionSampleBootReactiveRedisIndexedApplication::main) 27 | .with(TestcontainersConfig.class) 28 | .run(args); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-redis-json/src/integration-test/java/sample/pages/BasePage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample.pages; 18 | 19 | import org.openqa.selenium.WebDriver; 20 | 21 | /** 22 | * @author Eddú Meléndez 23 | */ 24 | public class BasePage { 25 | 26 | private WebDriver driver; 27 | 28 | public BasePage(WebDriver driver) { 29 | this.driver = driver; 30 | } 31 | 32 | public WebDriver getDriver() { 33 | return this.driver; 34 | } 35 | 36 | public static void get(WebDriver driver, String get) { 37 | String baseUrl = "http://localhost"; 38 | driver.get(baseUrl + get); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-redis-json/src/integration-test/resources/testcontainers.properties: -------------------------------------------------------------------------------- 1 | ryuk.container.timeout=120 2 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-redis-json/src/main/java/sample/Application.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample; 18 | 19 | import org.springframework.boot.SpringApplication; 20 | import org.springframework.boot.autoconfigure.SpringBootApplication; 21 | 22 | /** 23 | * @author jitendra on 3/3/16. 24 | */ 25 | @SpringBootApplication 26 | public class Application { 27 | 28 | public static void main(String[] args) { 29 | SpringApplication.run(Application.class, args); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-redis-json/src/main/java/sample/config/WebMvcConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample.config; 18 | 19 | import org.springframework.context.annotation.Configuration; 20 | import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; 21 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 22 | 23 | @Configuration 24 | public class WebMvcConfig implements WebMvcConfigurer { 25 | 26 | @Override 27 | public void addViewControllers(ViewControllerRegistry registry) { 28 | registry.addViewController("/").setViewName("home"); 29 | registry.addViewController("/login").setViewName("login"); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-redis-json/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.security.user.password=password 2 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-redis-json/src/main/resources/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-boot-redis-json/src/main/resources/static/favicon.ico -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-redis-json/src/main/resources/static/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-boot-redis-json/src/main/resources/static/images/logo.png -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-redis-json/src/main/resources/templates/home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Home 5 | 6 | 7 |
8 |
9 |
10 | Add value to session 11 | 12 | 13 | 14 |
15 |
16 |
17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Attribute NameAttribute Value
32 |
33 | 34 | 35 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-redis/src/integration-test/java/sample/pages/BasePage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample.pages; 18 | 19 | import org.openqa.selenium.WebDriver; 20 | 21 | /** 22 | * @author Eddú Meléndez 23 | */ 24 | public class BasePage { 25 | 26 | private WebDriver driver; 27 | 28 | public BasePage(WebDriver driver) { 29 | this.driver = driver; 30 | } 31 | 32 | public WebDriver getDriver() { 33 | return this.driver; 34 | } 35 | 36 | public static void get(WebDriver driver, String get) { 37 | String baseUrl = "http://localhost"; 38 | driver.get(baseUrl + get); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-redis/src/integration-test/resources/testcontainers.properties: -------------------------------------------------------------------------------- 1 | ryuk.container.timeout=120 2 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-redis/src/main/java/sample/Application.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample; 18 | 19 | import org.springframework.boot.SpringApplication; 20 | import org.springframework.boot.autoconfigure.SpringBootApplication; 21 | 22 | /** 23 | * @author Rob Winch 24 | */ 25 | @SpringBootApplication 26 | public class Application { 27 | 28 | public static void main(String[] args) { 29 | SpringApplication.run(Application.class, args); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-redis/src/main/java/sample/config/IndexController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample.config; 18 | 19 | import org.springframework.stereotype.Controller; 20 | import org.springframework.web.bind.annotation.GetMapping; 21 | 22 | /** 23 | * An index controller. 24 | * 25 | * @author Rob Winch 26 | */ 27 | @Controller 28 | public class IndexController { 29 | 30 | @GetMapping("/") 31 | String index() { 32 | return "index"; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-redis/src/main/java/sample/config/UserControllerAdvise.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample.config; 18 | 19 | import java.security.Principal; 20 | 21 | import org.springframework.web.bind.annotation.ControllerAdvice; 22 | import org.springframework.web.bind.annotation.ModelAttribute; 23 | 24 | /** 25 | * {@link ControllerAdvice} to expose user related attributes. 26 | * 27 | * @author Rob Winch 28 | */ 29 | @ControllerAdvice 30 | public class UserControllerAdvise { 31 | 32 | @ModelAttribute("currentUserName") 33 | String currentUser(Principal principal) { 34 | return (principal != null) ? principal.getName() : null; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-redis/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.security.user.password=password 2 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-redis/src/main/resources/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-boot-redis/src/main/resources/static/favicon.ico -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-redis/src/main/resources/static/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-boot-redis/src/main/resources/static/images/logo.png -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-redis/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Secured Content 4 | 5 | 6 |
7 |

Secured Page

8 |

This page is secured using Spring Boot, Spring Session, and Spring Security.

9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-webflux-custom-cookie/spring-session-sample-boot-webflux-custom-cookie.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'io.spring.convention.spring-sample-boot' 2 | 3 | dependencies { 4 | management platform(project(":spring-session-dependencies")) 5 | implementation project(':spring-session-data-redis') 6 | implementation "org.springframework.boot:spring-boot-starter-webflux" 7 | implementation "org.springframework.boot:spring-boot-starter-thymeleaf" 8 | implementation "org.springframework.boot:spring-boot-starter-data-redis" 9 | implementation "org.springframework.boot:spring-boot-devtools" 10 | implementation 'org.webjars:bootstrap' 11 | 12 | testImplementation "org.springframework.boot:spring-boot-starter-test" 13 | testImplementation "org.junit.jupiter:junit-jupiter-api" 14 | 15 | testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine" 16 | testRuntimeOnly "org.junit.platform:junit-platform-launcher" 17 | 18 | integrationTestCompile "org.htmlunit:htmlunit" 19 | integrationTestCompile "org.seleniumhq.selenium:htmlunit3-driver" 20 | integrationTestCompile "org.springframework.boot:spring-boot-testcontainers" 21 | integrationTestCompile "com.redis:testcontainers-redis" 22 | } 23 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-webflux-custom-cookie/src/integration-test/resources/testcontainers.properties: -------------------------------------------------------------------------------- 1 | ryuk.container.timeout=120 2 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-webflux-custom-cookie/src/main/java/sample/HelloWebFluxApplication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2020 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample; 18 | 19 | import org.springframework.boot.SpringApplication; 20 | import org.springframework.boot.autoconfigure.SpringBootApplication; 21 | 22 | /** 23 | * @author Eleftheria Stein 24 | */ 25 | @SpringBootApplication 26 | public class HelloWebFluxApplication { 27 | 28 | public static void main(String[] args) { 29 | SpringApplication.run(HelloWebFluxApplication.class, args); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-webflux-custom-cookie/src/main/resources/application.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-boot-webflux-custom-cookie/src/main/resources/application.properties -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-webflux/spring-session-sample-boot-webflux.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'io.spring.convention.spring-sample-boot' 2 | 3 | dependencies { 4 | management platform(project(":spring-session-dependencies")) 5 | implementation project(':spring-session-data-redis') 6 | implementation "org.springframework.boot:spring-boot-starter-webflux" 7 | implementation "org.springframework.boot:spring-boot-starter-thymeleaf" 8 | implementation "org.springframework.boot:spring-boot-starter-data-redis" 9 | implementation "org.springframework.boot:spring-boot-devtools" 10 | implementation 'org.webjars:bootstrap' 11 | 12 | testImplementation "org.springframework.boot:spring-boot-starter-test" 13 | testImplementation "org.junit.jupiter:junit-jupiter-api" 14 | 15 | testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine" 16 | testRuntimeOnly "org.junit.platform:junit-platform-launcher" 17 | 18 | integrationTestCompile "org.htmlunit:htmlunit" 19 | integrationTestCompile "org.seleniumhq.selenium:htmlunit3-driver" 20 | integrationTestCompile "org.springframework.boot:spring-boot-testcontainers" 21 | integrationTestCompile "com.redis:testcontainers-redis" 22 | } 23 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-webflux/src/integration-test/resources/testcontainers.properties: -------------------------------------------------------------------------------- 1 | ryuk.container.timeout=120 2 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-webflux/src/main/java/sample/HelloWebFluxApplication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample; 18 | 19 | import org.springframework.boot.SpringApplication; 20 | import org.springframework.boot.autoconfigure.SpringBootApplication; 21 | 22 | /** 23 | * @author Rob Winch 24 | */ 25 | @SpringBootApplication 26 | public class HelloWebFluxApplication { 27 | 28 | public static void main(String[] args) { 29 | SpringApplication.run(HelloWebFluxApplication.class, args); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-webflux/src/main/resources/application.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-boot-webflux/src/main/resources/application.properties -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-webflux/src/main/resources/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-boot-webflux/src/main/resources/static/favicon.ico -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-websocket/src/integration-test/resources/testcontainers.properties: -------------------------------------------------------------------------------- 1 | ryuk.container.timeout=120 2 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-websocket/src/main/java/sample/Application.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample; 18 | 19 | import org.springframework.boot.SpringApplication; 20 | import org.springframework.boot.autoconfigure.SpringBootApplication; 21 | 22 | /** 23 | * @author Rob Winch 24 | */ 25 | @SpringBootApplication 26 | public class Application { 27 | 28 | public static void main(String[] args) { 29 | SpringApplication.run(Application.class, args); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-websocket/src/main/java/sample/config/WebMvcConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample.config; 18 | 19 | import org.springframework.context.annotation.Configuration; 20 | import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; 21 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 22 | 23 | @Configuration 24 | public class WebMvcConfig implements WebMvcConfigurer { 25 | 26 | @Override 27 | public void addViewControllers(ViewControllerRegistry registry) { 28 | registry.addViewController("/").setViewName("index"); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-websocket/src/main/java/sample/data/ActiveWebSocketUserRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample.data; 18 | 19 | import java.util.List; 20 | 21 | import org.springframework.data.jpa.repository.Query; 22 | import org.springframework.data.repository.CrudRepository; 23 | 24 | public interface ActiveWebSocketUserRepository extends CrudRepository { 25 | 26 | @Query("select DISTINCT(u.username) from ActiveWebSocketUser u where u.username != ?#{principal?.username}") 27 | List findAllActiveUsers(); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-websocket/src/main/java/sample/data/UserRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample.data; 18 | 19 | import org.springframework.data.repository.CrudRepository; 20 | 21 | /** 22 | * Allows managing {@link User} instances. 23 | * 24 | * @author Rob Winch 25 | * 26 | */ 27 | public interface UserRepository extends CrudRepository { 28 | 29 | User findByEmail(String email); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-websocket/src/main/java/sample/mvc/CsrfController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample.mvc; 18 | 19 | import org.springframework.security.web.csrf.CsrfToken; 20 | import org.springframework.web.bind.annotation.RequestMapping; 21 | import org.springframework.web.bind.annotation.RestController; 22 | 23 | @RestController 24 | public class CsrfController { 25 | 26 | @RequestMapping("/csrf") 27 | public CsrfToken csrf(CsrfToken token) { 28 | return token; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-websocket/src/main/java/sample/mvc/UserControllerAdvise.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample.mvc; 18 | 19 | import java.security.Principal; 20 | 21 | import org.springframework.web.bind.annotation.ControllerAdvice; 22 | import org.springframework.web.bind.annotation.ModelAttribute; 23 | 24 | /** 25 | * {@link ControllerAdvice} to expose user related attributes. 26 | * 27 | * @author Rob Winch 28 | */ 29 | @ControllerAdvice 30 | public class UserControllerAdvise { 31 | 32 | @ModelAttribute("currentUserName") 33 | String currentUser(Principal principal) { 34 | return (principal != null) ? principal.getName() : null; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-websocket/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | #server.servlet.session.timeout=1m 2 | spring.h2.console.enabled=true 3 | spring.jpa.defer-datasource-initialization=true 4 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-websocket/src/main/resources/data.sql: -------------------------------------------------------------------------------- 1 | insert into custom_user(id,email,password,first_name,last_name) values (0,'rob','password','Rob','Winch'); 2 | insert into custom_user(id,email,password,first_name,last_name) values (1,'luke','password','Luke','Taylor'); 3 | insert into custom_user(id,email,password,first_name,last_name) values (2,'eve','password','Luke','Taylor'); 4 | 5 | update custom_user set password = '$2a$10$FBAKClV1zBIOOC9XMXf3AO8RoGXYVYsfvUdoLxGkd/BnXEn4tqT3u'; 6 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-websocket/src/main/resources/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-boot-websocket/src/main/resources/static/favicon.ico -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-boot-websocket/src/main/resources/static/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-boot-websocket/src/main/resources/static/images/logo.png -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-custom-cookie/src/main/java/sample/Initializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample; 18 | 19 | import org.springframework.session.web.context.AbstractHttpSessionApplicationInitializer; 20 | 21 | // @formatter:off 22 | // tag::class[] 23 | public class Initializer extends AbstractHttpSessionApplicationInitializer { // <1> 24 | 25 | public Initializer() { 26 | super(Config.class); // <2> 27 | } 28 | 29 | } 30 | // end::class[] 31 | // @formatter:on 32 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-custom-cookie/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-custom-cookie/src/main/resources/testcontainers.properties: -------------------------------------------------------------------------------- 1 | ryuk.container.timeout=120 2 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-custom-cookie/src/main/webapp/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-javaconfig-custom-cookie/src/main/webapp/META-INF/MANIFEST.MF -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-hazelcast/src/main/java/sample/Initializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2016 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample; 18 | 19 | import org.springframework.session.web.context.AbstractHttpSessionApplicationInitializer; 20 | 21 | // tag::class[] 22 | public class Initializer extends AbstractHttpSessionApplicationInitializer { 23 | 24 | } 25 | // end::class[] 26 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-hazelcast/src/main/java/sample/SecurityInitializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample; 18 | 19 | import org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer; 20 | 21 | // tag::class[] 22 | public class SecurityInitializer extends AbstractSecurityWebApplicationInitializer { 23 | 24 | public SecurityInitializer() { 25 | super(SecurityConfig.class, SessionConfig.class); 26 | } 27 | 28 | } 29 | // end::class[] 30 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-hazelcast/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-hazelcast/src/main/webapp/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-javaconfig-hazelcast/src/main/webapp/META-INF/MANIFEST.MF -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-hazelcast/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 2 | 3 | 4 | 5 | Secured Content 6 | 14 | 15 | 16 |
17 |

Description

18 |

This demonstrates how Spring Session and Hazelcast can be combined with Spring Security. The important thing to ensure is that Spring Session's Filter is included before Spring Security's Filter.

19 | 20 |

Logged in as

21 | 22 |

You are currently logged in as .

23 | 24 | 25 |
26 | 27 | 28 |
29 |
30 | 31 | 32 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-jdbc/spring-session-sample-javaconfig-jdbc.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "org.gretty" version "4.1.0" 3 | id "io.spring.convention.spring-sample-war" 4 | } 5 | 6 | dependencies { 7 | management platform(project(":spring-session-dependencies")) 8 | implementation project(':spring-session-jdbc') 9 | implementation "org.springframework:spring-web" 10 | implementation "com.h2database:h2" 11 | implementation "org.slf4j:slf4j-api" 12 | implementation "org.slf4j:jcl-over-slf4j" 13 | implementation "org.slf4j:log4j-over-slf4j" 14 | implementation "ch.qos.logback:logback-classic" 15 | 16 | providedCompile "jakarta.servlet:jakarta.servlet-api" 17 | providedCompile "org.glassfish.web:jakarta.servlet.jsp.jstl" 18 | providedCompile "jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api" 19 | 20 | testImplementation "org.assertj:assertj-core" 21 | testImplementation "org.junit.jupiter:junit-jupiter-api" 22 | 23 | testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine" 24 | testRuntimeOnly "org.junit.platform:junit-platform-launcher" 25 | 26 | integrationTestCompile "org.htmlunit:htmlunit" 27 | integrationTestCompile "org.seleniumhq.selenium:htmlunit3-driver" 28 | } 29 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-jdbc/src/main/java/sample/Initializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample; 18 | 19 | import org.springframework.session.web.context.AbstractHttpSessionApplicationInitializer; 20 | 21 | // @formatter:off 22 | // tag::class[] 23 | public class Initializer extends AbstractHttpSessionApplicationInitializer { // <1> 24 | 25 | public Initializer() { 26 | super(Config.class); // <2> 27 | } 28 | 29 | } 30 | // end::class[] 31 | // @formatter:on 32 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-jdbc/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-jdbc/src/main/webapp/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-javaconfig-jdbc/src/main/webapp/META-INF/MANIFEST.MF -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-redis/src/main/java/sample/Initializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample; 18 | 19 | import org.springframework.session.web.context.AbstractHttpSessionApplicationInitializer; 20 | 21 | // @formatter:off 22 | // tag::class[] 23 | public class Initializer extends AbstractHttpSessionApplicationInitializer { // <1> 24 | 25 | public Initializer() { 26 | super(Config.class); // <2> 27 | } 28 | 29 | } 30 | // end::class[] 31 | // @formatter:on 32 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-redis/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-redis/src/main/resources/testcontainers.properties: -------------------------------------------------------------------------------- 1 | ryuk.container.timeout=120 2 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-redis/src/main/webapp/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-javaconfig-redis/src/main/webapp/META-INF/MANIFEST.MF -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-rest/src/integration-test/java/sample/User.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample; 18 | 19 | /** 20 | * @author Pool Dolorier 21 | */ 22 | public class User { 23 | 24 | private String username; 25 | 26 | public String getUsername() { 27 | return this.username; 28 | } 29 | 30 | public void setUsername(String username) { 31 | this.username = username; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-rest/src/main/java/sample/Initializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2016 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample; 18 | 19 | import org.springframework.session.web.context.AbstractHttpSessionApplicationInitializer; 20 | 21 | // tag::class[] 22 | public class Initializer extends AbstractHttpSessionApplicationInitializer { 23 | 24 | } 25 | // end::class[] 26 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-rest/src/main/java/sample/SecurityInitializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2016 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample; 18 | 19 | import org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer; 20 | 21 | /** 22 | * @author Rob Winch 23 | */ 24 | public class SecurityInitializer extends AbstractSecurityWebApplicationInitializer { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-rest/src/main/java/sample/mvc/MvcConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample.mvc; 18 | 19 | import org.springframework.context.annotation.ComponentScan; 20 | import org.springframework.context.annotation.Configuration; 21 | import org.springframework.web.servlet.config.annotation.EnableWebMvc; 22 | 23 | /** 24 | * @author Rob Winch 25 | */ 26 | @Configuration 27 | @EnableWebMvc 28 | @ComponentScan 29 | public class MvcConfig { 30 | 31 | } 32 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-rest/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-rest/src/main/resources/testcontainers.properties: -------------------------------------------------------------------------------- 1 | ryuk.container.timeout=120 2 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-rest/src/main/webapp/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-javaconfig-rest/src/main/webapp/META-INF/MANIFEST.MF -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-security/src/integration-test/java/sample/pages/BasePage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample.pages; 18 | 19 | import org.openqa.selenium.WebDriver; 20 | 21 | /** 22 | * @author Pool Dolorier 23 | */ 24 | public abstract class BasePage { 25 | 26 | private WebDriver driver; 27 | 28 | public BasePage(WebDriver driver) { 29 | this.driver = driver; 30 | } 31 | 32 | public WebDriver getDriver() { 33 | return this.driver; 34 | } 35 | 36 | public static void get(WebDriver driver, String get) { 37 | String baseUrl = "http://localhost:" + System.getProperty("app.port"); 38 | driver.get(baseUrl + get); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-security/src/main/java/sample/Initializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2016 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample; 18 | 19 | import org.springframework.session.web.context.AbstractHttpSessionApplicationInitializer; 20 | 21 | // tag::class[] 22 | public class Initializer extends AbstractHttpSessionApplicationInitializer { 23 | 24 | } 25 | // end::class[] 26 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-security/src/main/java/sample/SecurityInitializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package sample; 18 | 19 | import org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer; 20 | 21 | // tag::class[] 22 | public class SecurityInitializer extends AbstractSecurityWebApplicationInitializer { 23 | 24 | public SecurityInitializer() { 25 | super(SecurityConfig.class, Config.class); 26 | } 27 | 28 | } 29 | // end::class[] 30 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-security/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-security/src/main/resources/testcontainers.properties: -------------------------------------------------------------------------------- 1 | ryuk.container.timeout=120 2 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-security/src/main/webapp/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-javaconfig-security/src/main/webapp/META-INF/MANIFEST.MF -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-javaconfig-security/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 2 | 3 | 4 | 5 | Secured Content 6 | 14 | 15 | 16 |
17 |

Description

18 |

This demonstrates how Spring Session can be combined with Spring Security. The important thing to ensure is that Spring Session's Filter is included before Spring Security's Filter.

19 | 20 |

Logged in as

21 | 22 |

You are currently logged in as .

23 | 24 | 25 |
26 | 27 | 28 |
29 |
30 | 31 | 32 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-misc-hazelcast/spring-session-sample-misc-hazelcast.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "org.gretty" version "4.1.0" 3 | id "io.spring.convention.spring-sample-war" 4 | } 5 | 6 | dependencies { 7 | management platform(project(":spring-session-dependencies")) 8 | implementation project(':spring-session-core') 9 | implementation "com.hazelcast:hazelcast" 10 | implementation "org.slf4j:slf4j-api" 11 | implementation "org.slf4j:jcl-over-slf4j" 12 | implementation "org.slf4j:log4j-over-slf4j" 13 | implementation "ch.qos.logback:logback-classic" 14 | 15 | providedCompile "jakarta.servlet:jakarta.servlet-api" 16 | providedCompile "org.glassfish.web:jakarta.servlet.jsp.jstl" 17 | providedCompile "jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api" 18 | 19 | testImplementation "org.assertj:assertj-core" 20 | testImplementation "org.junit.jupiter:junit-jupiter-api" 21 | 22 | testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine" 23 | testRuntimeOnly "org.junit.platform:junit-platform-launcher" 24 | 25 | integrationTestCompile "org.htmlunit:htmlunit" 26 | integrationTestCompile "org.seleniumhq.selenium:htmlunit3-driver" 27 | } 28 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-misc-hazelcast/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-misc-hazelcast/src/main/webapp/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-misc-hazelcast/src/main/webapp/META-INF/MANIFEST.MF -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-xml-jdbc/spring-session-sample-xml-jdbc.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "org.gretty" version "4.1.0" 3 | id "io.spring.convention.spring-sample-war" 4 | } 5 | 6 | dependencies { 7 | management platform(project(":spring-session-dependencies")) 8 | implementation project(':spring-session-jdbc') 9 | implementation "org.springframework:spring-web" 10 | implementation "com.h2database:h2" 11 | implementation "org.slf4j:slf4j-api" 12 | implementation "org.slf4j:jcl-over-slf4j" 13 | implementation "org.slf4j:log4j-over-slf4j" 14 | implementation "ch.qos.logback:logback-classic" 15 | 16 | providedCompile "jakarta.servlet:jakarta.servlet-api" 17 | providedCompile "org.glassfish.web:jakarta.servlet.jsp.jstl" 18 | providedCompile "jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api" 19 | 20 | testImplementation "org.assertj:assertj-core" 21 | testImplementation "org.junit.jupiter:junit-jupiter-api" 22 | 23 | testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine" 24 | testRuntimeOnly "org.junit.platform:junit-platform-launcher" 25 | 26 | integrationTestCompile "org.htmlunit:htmlunit" 27 | integrationTestCompile "org.seleniumhq.selenium:htmlunit3-driver" 28 | } 29 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-xml-jdbc/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-xml-jdbc/src/main/webapp/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-xml-jdbc/src/main/webapp/META-INF/MANIFEST.MF -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-xml-jdbc/src/main/webapp/WEB-INF/spring/session.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-xml-redis/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-xml-redis/src/main/resources/testcontainers.properties: -------------------------------------------------------------------------------- 1 | ryuk.container.timeout=120 2 | -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-xml-redis/src/main/webapp/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-session/bae38dda3d117af1db755732d08ffef0eefca4fc/spring-session-samples/spring-session-sample-xml-redis/src/main/webapp/META-INF/MANIFEST.MF -------------------------------------------------------------------------------- /spring-session-samples/spring-session-sample-xml-redis/src/main/webapp/WEB-INF/spring/session.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | --------------------------------------------------------------------------------