Adds boot 2.3 compatiblity
This commit is contained in:
@@ -40,6 +40,7 @@ class SpringBootVersionVerifier implements CompatibilityVerifier {
|
||||
this.put("2.0", is2_0());
|
||||
this.put("2.1", is2_1());
|
||||
this.put("2.2", is2_2());
|
||||
this.put("2.3", is2_3());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -162,6 +163,30 @@ class SpringBootVersionVerifier implements CompatibilityVerifier {
|
||||
};
|
||||
}
|
||||
|
||||
CompatibilityPredicate is2_3() {
|
||||
return new CompatibilityPredicate() {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Predicate for Boot 2.3";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCompatible() {
|
||||
try {
|
||||
// since 2.3
|
||||
Class.forName(
|
||||
"org.springframework.boot.context.propertie.BoundConfigurationProperties");
|
||||
return true;
|
||||
}
|
||||
catch (ClassNotFoundException e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private String errorDescription() {
|
||||
String versionFromManifest = getVersionFromManifest();
|
||||
if (StringUtils.hasText(versionFromManifest)) {
|
||||
|
||||
@@ -144,7 +144,7 @@ public class SpringBootDependencyTests {
|
||||
|
||||
@Test
|
||||
public void should_match_against_current_manifest() {
|
||||
List<String> acceptedVersions = Collections.singletonList("2.2");
|
||||
List<String> acceptedVersions = Collections.singletonList("2.3");
|
||||
SpringBootVersionVerifier versionVerifier = new SpringBootVersionVerifier(
|
||||
acceptedVersions);
|
||||
versionVerifier.ACCEPTED_VERSIONS.clear();
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-context</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
|
||||
Reference in New Issue
Block a user