use of io.micronaut.starter.feature.FeaturePredicate in project micronaut-starter by micronaut-projects.
the class Springloaded method processSelectedFeatures.
@Override
public void processSelectedFeatures(FeatureContext featureContext) {
int jdkVersion = featureContext.getJavaVersion().majorVersion();
if (jdkVersion >= 9) {
Springloaded springloaded = this;
featureContext.exclude(new FeaturePredicate() {
@Override
public boolean test(Feature feature) {
return feature == springloaded;
}
@Override
public Optional<String> getWarning() {
return Optional.of("Springloaded was excluded because it does not support JDK " + jdkVersion);
}
});
}
}
Aggregations