Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Commit 5113ee2

Browse files
committed
Fail fast when using devtools
To remove when support will be added via gh-532 Closes gh-528
1 parent 023817b commit 5113ee2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

spring-aot/src/main/java/org/springframework/aot/factories/DefaultFactoriesCodeContributor.java

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import java.util.function.Consumer;
44

55
import com.squareup.javapoet.CodeBlock;
6+
import org.apache.commons.logging.Log;
7+
import org.apache.commons.logging.LogFactory;
68

79
import org.springframework.aot.BuildContext;
810
import org.springframework.core.type.classreading.MethodDescriptor;
@@ -21,6 +23,8 @@ class DefaultFactoriesCodeContributor implements FactoriesCodeContributor {
2123

2224
private final AotOptions aotOptions;
2325

26+
private static final Log logger = LogFactory.getLog(DefaultFactoriesCodeContributor.class);
27+
2428
DefaultFactoriesCodeContributor(AotOptions aotOptions) {
2529
this.aotOptions = aotOptions;
2630
}
@@ -69,6 +73,8 @@ private boolean passesFilterCheck(TypeSystem typeSystem, SpringFactory factory)
6973
return false;
7074
} else if (factoryName.equals("org.springframework.boot.env.YamlPropertySourceLoader")) {
7175
return !aotOptions.isRemoveYamlSupport();
76+
} else if (factoryName.startsWith("org.springframework.boot.devtools")) {
77+
throw new IllegalStateException("Devtools is not supported yet, please remove the related dependency for now.");
7278
}
7379
return true;
7480
}

0 commit comments

Comments
 (0)