diff --git a/gradle.properties b/gradle.properties index 98c9b6c6..371b93f1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,7 +14,7 @@ mockitoVersion=1.10.19 hazelcastVersion=3.6.5 springDataGeodeVersion=1.0.0.APACHE-GEODE-INCUBATING-M2 seleniumVersion=2.52.0 -springSecurityVersion=4.2.0.M1 +springSecurityVersion=4.2.0.RELEASE springVersion=4.2.5.RELEASE httpClientVersion=4.5.1 jedisVersion=2.8.1 diff --git a/samples/boot/build.gradle b/samples/boot/build.gradle index 21e88cfe..656d6f63 100644 --- a/samples/boot/build.gradle +++ b/samples/boot/build.gradle @@ -19,13 +19,12 @@ dependencies { "org.springframework.boot:spring-boot-starter-redis", "org.springframework.boot:spring-boot-starter-web", "org.springframework.boot:spring-boot-starter-thymeleaf", + "org.springframework.boot:spring-boot-starter-security", "nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect", "org.thymeleaf.extras:thymeleaf-extras-conditionalcomments", "org.webjars:bootstrap:$bootstrapVersion", "org.webjars:html5shiv:$html5ShivVersion", - "org.webjars:webjars-locator", - "org.springframework.security:spring-security-web:$springSecurityVersion", - "org.springframework.security:spring-security-config:$springSecurityVersion" + "org.webjars:webjars-locator" testCompile "org.springframework.boot:spring-boot-starter-test" diff --git a/samples/findbyusername/build.gradle b/samples/findbyusername/build.gradle index b7c48380..23626f6a 100644 --- a/samples/findbyusername/build.gradle +++ b/samples/findbyusername/build.gradle @@ -18,14 +18,13 @@ dependencies { compile project(':spring-session'), "org.springframework.boot:spring-boot-starter-redis", "org.springframework.boot:spring-boot-starter-web", + "org.springframework.boot:spring-boot-starter-security", "org.springframework.boot:spring-boot-starter-thymeleaf", "nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect", "org.thymeleaf.extras:thymeleaf-extras-conditionalcomments", "org.webjars:bootstrap:$bootstrapVersion", "org.webjars:html5shiv:$html5ShivVersion", "org.webjars:webjars-locator", - "org.springframework.security:spring-security-web:$springSecurityVersion", - "org.springframework.security:spring-security-config:$springSecurityVersion", "com.maxmind.geoip2:geoip2:2.3.1", "org.apache.httpcomponents:httpclient" diff --git a/samples/httpsession-jdbc-boot/build.gradle b/samples/httpsession-jdbc-boot/build.gradle index 319a183e..29fe7fec 100644 --- a/samples/httpsession-jdbc-boot/build.gradle +++ b/samples/httpsession-jdbc-boot/build.gradle @@ -18,15 +18,14 @@ dependencies { compile project(':spring-session-jdbc'), "org.springframework.boot:spring-boot-starter-jdbc", "org.springframework.boot:spring-boot-starter-web", + "org.springframework.boot:spring-boot-starter-security", "org.springframework.boot:spring-boot-starter-thymeleaf", "nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect", "org.thymeleaf.extras:thymeleaf-extras-conditionalcomments", "org.webjars:bootstrap:$bootstrapVersion", "org.webjars:html5shiv:$html5ShivVersion", "org.webjars:webjars-locator", - "com.h2database:h2", - "org.springframework.security:spring-security-web:$springSecurityVersion", - "org.springframework.security:spring-security-config:$springSecurityVersion" + "com.h2database:h2" testCompile "org.springframework.boot:spring-boot-starter-test" diff --git a/samples/httpsession-redis-json/build.gradle b/samples/httpsession-redis-json/build.gradle index daa37355..b4bf15a1 100644 --- a/samples/httpsession-redis-json/build.gradle +++ b/samples/httpsession-redis-json/build.gradle @@ -19,15 +19,15 @@ ext { assertjVersion = "2.4.0" } +ext['spring-security.version'] = springSecurityVersion + dependencies { compile project(':spring-session'), "org.springframework.boot:spring-boot-starter-redis", "org.springframework.boot:spring-boot-starter-web", "org.springframework.boot:spring-boot-starter-thymeleaf", + "org.springframework.boot:spring-boot-starter-security", "nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect", - "org.springframework.security:spring-security-web:$springSecurityVersion", - "org.springframework.security:spring-security-core:$springSecurityVersion", - "org.springframework.security:spring-security-config:$springSecurityVersion", "org.apache.httpcomponents:httpclient" testCompile "org.springframework.boot:spring-boot-starter-test", diff --git a/samples/httpsession-redis-json/src/main/java/sample/config/SessionConfig.java b/samples/httpsession-redis-json/src/main/java/sample/config/SessionConfig.java index 681f885a..f8adf68d 100644 --- a/samples/httpsession-redis-json/src/main/java/sample/config/SessionConfig.java +++ b/samples/httpsession-redis-json/src/main/java/sample/config/SessionConfig.java @@ -22,7 +22,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer; import org.springframework.data.redis.serializer.RedisSerializer; -import org.springframework.security.jackson2.SecurityJacksonModules; +import org.springframework.security.jackson2.SecurityJackson2Modules; import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession; /** @@ -51,7 +51,7 @@ public class SessionConfig implements BeanClassLoaderAware { */ ObjectMapper objectMapper() { ObjectMapper mapper = new ObjectMapper(); - mapper.registerModules(SecurityJacksonModules.getModules(this.loader)); + mapper.registerModules(SecurityJackson2Modules.getModules(this.loader)); return mapper; } diff --git a/samples/mongo/build.gradle b/samples/mongo/build.gradle index c708cee5..973ef471 100644 --- a/samples/mongo/build.gradle +++ b/samples/mongo/build.gradle @@ -18,15 +18,14 @@ dependencies { compile project(':spring-session'), "org.springframework.boot:spring-boot-starter-data-mongodb", "org.springframework.boot:spring-boot-starter-web", + "org.springframework.boot:spring-boot-starter-security", "org.springframework.boot:spring-boot-starter-thymeleaf", "nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect", "org.thymeleaf.extras:thymeleaf-extras-conditionalcomments", "org.webjars:bootstrap:$bootstrapVersion", "org.webjars:html5shiv:$html5ShivVersion", "org.webjars:webjars-locator", - "de.flapdoodle.embed:de.flapdoodle.embed.mongo", - "org.springframework.security:spring-security-web:$springSecurityVersion", - "org.springframework.security:spring-security-config:$springSecurityVersion" + "de.flapdoodle.embed:de.flapdoodle.embed.mongo" testCompile "org.springframework.boot:spring-boot-starter-test"