Raise the minimum supported version of Spring Framework to 5.0

This commit upgrades to Spring Framework 5.0.0.RC1. It also upgrades
the Spring Boot-based samples to use Spring Boot 2.0.0.M1 which
supports Spring Framework 5. Lastly, it upgrades a number of
third-party dependencies to align with Spring Framework 5 and Spring
Boot 2.

Closes gh-386
This commit is contained in:
Andy Wilkinson
2017-05-18 16:22:08 +02:00
parent a8e1df3fd8
commit 41d537d06a
18 changed files with 52 additions and 44 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -53,8 +53,10 @@ public abstract class AbstractHeadersSnippet extends TemplatedSnippet {
Map<String, Object> attributes) {
super(type + "-headers", attributes);
for (HeaderDescriptor descriptor : descriptors) {
Assert.notNull(descriptor.getName());
Assert.notNull(descriptor.getDescription());
Assert.notNull(descriptor.getName(),
"The name of the header must not be null");
Assert.notNull(descriptor.getDescription(),
"The description of the header must not be null");
}
this.headerDescriptors = descriptors;
this.type = type;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2015 the original author or authors.
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -270,7 +270,8 @@ public class ResourceBundleConstraintDescriptionResolverTests {
private Constraint getConstraintFromField(String name) {
Annotation[] annotations = ReflectionUtils.findField(Constrained.class, name)
.getAnnotations();
Assert.isTrue(annotations.length == 1);
Assert.isTrue(annotations.length == 1, "The field '" + name + "' must have"
+ "exactly one @Constrained annotation");
return new Constraint(annotations[0].annotationType().getName(),
AnnotationUtils.getAnnotationAttributes(annotations[0]));
}