mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Fixed name of annotation and a typo in the code.
This commit is contained in:
parent
25f68404f3
commit
6c4e39d4c1
@ -29,7 +29,7 @@ public abstract class AstUtils {
|
|||||||
/**
|
/**
|
||||||
* Determine if an {@link AnnotatedNode} has one or more of the specified annotations.
|
* Determine if an {@link AnnotatedNode} has one or more of the specified annotations.
|
||||||
*/
|
*/
|
||||||
public static boolean hasLeastOneAnnotation(AnnotatedNode node, String... annotations) {
|
public static boolean hasAtLeastOneAnnotation(AnnotatedNode node, String... annotations) {
|
||||||
|
|
||||||
for (AnnotationNode annotationNode : node.getAnnotations()) {
|
for (AnnotationNode annotationNode : node.getAnnotations()) {
|
||||||
for (String annotation : annotations) {
|
for (String annotation : annotations) {
|
||||||
|
@ -32,7 +32,7 @@ public class SpringBatchCompilerAutoConfiguration extends CompilerAutoConfigurat
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matches(ClassNode classNode) {
|
public boolean matches(ClassNode classNode) {
|
||||||
return AstUtils.hasLeastOneAnnotation(classNode, "EnableBatchProcessing");
|
return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableBatchProcessing");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -29,7 +29,7 @@ import org.springframework.bootstrap.cli.compiler.CompilerAutoConfiguration;
|
|||||||
import org.springframework.bootstrap.cli.compiler.DependencyCustomizer;
|
import org.springframework.bootstrap.cli.compiler.DependencyCustomizer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link CompilerAutoConfiguration} for Spring Batch.
|
* {@link CompilerAutoConfiguration} for Spring Integration.
|
||||||
*
|
*
|
||||||
* @author Dave Syer
|
* @author Dave Syer
|
||||||
*/
|
*/
|
||||||
@ -39,7 +39,7 @@ public class SpringIntegrationCompilerAutoConfiguration extends CompilerAutoConf
|
|||||||
public boolean matches(ClassNode classNode) {
|
public boolean matches(ClassNode classNode) {
|
||||||
// Slightly weird detection algorithm because there is no @Enable annotation for
|
// Slightly weird detection algorithm because there is no @Enable annotation for
|
||||||
// Integration
|
// Integration
|
||||||
return AstUtils.hasLeastOneAnnotation(classNode, "MessageEndpoint",
|
return AstUtils.hasAtLeastOneAnnotation(classNode, "MessageEndpoint",
|
||||||
"EnableIntegrationPatterns");
|
"EnableIntegrationPatterns");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ public class SpringMvcCompilerAutoConfiguration extends CompilerAutoConfiguratio
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matches(ClassNode classNode) {
|
public boolean matches(ClassNode classNode) {
|
||||||
return AstUtils.hasLeastOneAnnotation(classNode, "Controller", "EnableWebMvc");
|
return AstUtils.hasAtLeastOneAnnotation(classNode, "Controller", "EnableWebMvc");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user