From f2717363f034d898f3a33d0a964a24ff0638da8f Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 26 Jul 2016 12:09:20 +0100 Subject: [PATCH] Raise the minimum Spring Framework version to 4.3.x Closes gh-284 --- build.gradle | 4 ++-- docs/src/docs/asciidoc/getting-started.adoc | 2 +- samples/rest-assured/build.gradle | 1 + samples/rest-notes-grails/build.gradle | 1 + samples/rest-notes-slate/build.gradle | 1 + samples/rest-notes-spring-data-rest/pom.xml | 1 + samples/rest-notes-spring-hateoas/build.gradle | 1 + samples/testng/build.gradle | 2 ++ .../restdocs/operation/AbstractOperationMessage.java | 2 +- .../operation/preprocess/PatternReplacingContentModifier.java | 4 ++-- .../preprocess/UriModifyingOperationPreprocessor.java | 4 ++-- 11 files changed, 15 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 498ea2f6..330e8355 100644 --- a/build.gradle +++ b/build.gradle @@ -34,7 +34,7 @@ sonarqube { } ext { - springVersion = '4.2.5.RELEASE' + springVersion = '4.3.1.RELEASE' javadocLinks = [ 'http://docs.oracle.com/javase/8/docs/api/', "http://docs.spring.io/spring-framework/docs/$springVersion/javadoc-api/", @@ -60,7 +60,7 @@ subprojects { mavenBom "org.springframework:spring-framework-bom:$springVersion" } dependencies { - dependency 'com.fasterxml.jackson.core:jackson-databind:2.4.6.1' + dependency 'com.fasterxml.jackson.core:jackson-databind:2.5.5' dependency 'com.jayway.restassured:rest-assured:2.8.0' dependency 'com.samskivert:jmustache:1.12' dependency 'commons-codec:commons-codec:1.10' diff --git a/docs/src/docs/asciidoc/getting-started.adoc b/docs/src/docs/asciidoc/getting-started.adoc index 0dd07620..9b0040ab 100644 --- a/docs/src/docs/asciidoc/getting-started.adoc +++ b/docs/src/docs/asciidoc/getting-started.adoc @@ -68,7 +68,7 @@ If you want to jump straight in, a number of sample applications are available: Spring REST Docs has the following minimum requirements: - Java 7 -- Spring Framework 4.2 +- Spring Framework 4.3 Additionally, the `spring-restdocs-restassured` module has the following minimum requirements: diff --git a/samples/rest-assured/build.gradle b/samples/rest-assured/build.gradle index 4d5bb523..ea67c861 100644 --- a/samples/rest-assured/build.gradle +++ b/samples/rest-assured/build.gradle @@ -31,6 +31,7 @@ ext { } ext['spring-restdocs.version'] = '1.2.0.BUILD-SNAPSHOT' +ext['spring.version']='4.3.1.RELEASE' dependencies { compile 'org.springframework.boot:spring-boot-starter-web' diff --git a/samples/rest-notes-grails/build.gradle b/samples/rest-notes-grails/build.gradle index 535ba315..52ef8395 100644 --- a/samples/rest-notes-grails/build.gradle +++ b/samples/rest-notes-grails/build.gradle @@ -47,6 +47,7 @@ dependencyManagement { } imports { mavenBom "org.grails:grails-bom:$grailsVersion" + mavenBom "org.springframework:spring-framework-bom:4.3.1.RELEASE" } applyMavenExclusions false } diff --git a/samples/rest-notes-slate/build.gradle b/samples/rest-notes-slate/build.gradle index 91aea3b8..157e7125 100644 --- a/samples/rest-notes-slate/build.gradle +++ b/samples/rest-notes-slate/build.gradle @@ -27,6 +27,7 @@ ext { } ext['spring-restdocs.version'] = '1.2.0.BUILD-SNAPSHOT' +ext['spring.version']='4.3.1.RELEASE' dependencies { compile 'org.springframework.boot:spring-boot-starter-data-jpa' diff --git a/samples/rest-notes-spring-data-rest/pom.xml b/samples/rest-notes-spring-data-rest/pom.xml index 21699808..cae3b9a8 100644 --- a/samples/rest-notes-spring-data-rest/pom.xml +++ b/samples/rest-notes-spring-data-rest/pom.xml @@ -18,6 +18,7 @@ UTF-8 1.7 + 4.3.1.RELEASE 1.2.0.BUILD-SNAPSHOT diff --git a/samples/rest-notes-spring-hateoas/build.gradle b/samples/rest-notes-spring-hateoas/build.gradle index 1be4c82f..89a45741 100644 --- a/samples/rest-notes-spring-hateoas/build.gradle +++ b/samples/rest-notes-spring-hateoas/build.gradle @@ -30,6 +30,7 @@ ext { snippetsDir = file('build/generated-snippets') } +ext['spring.version']='4.3.1.RELEASE' ext['spring-restdocs.version'] = '1.2.0.BUILD-SNAPSHOT' dependencies { diff --git a/samples/testng/build.gradle b/samples/testng/build.gradle index f1e791c8..b0be8697 100644 --- a/samples/testng/build.gradle +++ b/samples/testng/build.gradle @@ -29,6 +29,8 @@ targetCompatibility = 1.7 ext { snippetsDir = file('build/generated-snippets') } + +ext['spring.version']='4.3.1.RELEASE' ext['spring-restdocs.version'] = '1.2.0.BUILD-SNAPSHOT' dependencies { diff --git a/spring-restdocs-core/src/main/java/org/springframework/restdocs/operation/AbstractOperationMessage.java b/spring-restdocs-core/src/main/java/org/springframework/restdocs/operation/AbstractOperationMessage.java index 41e8fec3..75c48e66 100644 --- a/spring-restdocs-core/src/main/java/org/springframework/restdocs/operation/AbstractOperationMessage.java +++ b/spring-restdocs-core/src/main/java/org/springframework/restdocs/operation/AbstractOperationMessage.java @@ -63,7 +63,7 @@ abstract class AbstractOperationMessage { if (contentType == null) { return null; } - return contentType.getCharSet(); + return contentType.getCharset(); } } diff --git a/spring-restdocs-core/src/main/java/org/springframework/restdocs/operation/preprocess/PatternReplacingContentModifier.java b/spring-restdocs-core/src/main/java/org/springframework/restdocs/operation/preprocess/PatternReplacingContentModifier.java index 7fe67754..f33f6be6 100644 --- a/spring-restdocs-core/src/main/java/org/springframework/restdocs/operation/preprocess/PatternReplacingContentModifier.java +++ b/spring-restdocs-core/src/main/java/org/springframework/restdocs/operation/preprocess/PatternReplacingContentModifier.java @@ -49,8 +49,8 @@ class PatternReplacingContentModifier implements ContentModifier { @Override public byte[] modifyContent(byte[] content, MediaType contentType) { String original; - if (contentType != null && contentType.getCharSet() != null) { - original = new String(content, contentType.getCharSet()); + if (contentType != null && contentType.getCharset() != null) { + original = new String(content, contentType.getCharset()); } else { original = new String(content); diff --git a/spring-restdocs-restassured/src/main/java/org/springframework/restdocs/restassured/operation/preprocess/UriModifyingOperationPreprocessor.java b/spring-restdocs-restassured/src/main/java/org/springframework/restdocs/restassured/operation/preprocess/UriModifyingOperationPreprocessor.java index 1a479814..60972943 100644 --- a/spring-restdocs-restassured/src/main/java/org/springframework/restdocs/restassured/operation/preprocess/UriModifyingOperationPreprocessor.java +++ b/spring-restdocs-restassured/src/main/java/org/springframework/restdocs/restassured/operation/preprocess/UriModifyingOperationPreprocessor.java @@ -203,8 +203,8 @@ public final class UriModifyingOperationPreprocessor implements OperationPreproc @Override public byte[] modifyContent(byte[] content, MediaType contentType) { String input; - if (contentType != null && contentType.getCharSet() != null) { - input = new String(content, contentType.getCharSet()); + if (contentType != null && contentType.getCharset() != null) { + input = new String(content, contentType.getCharset()); } else { input = new String(content);