org.springframework.boot.SpringBootConfiguration Java Examples

The following examples show how to use org.springframework.boot.SpringBootConfiguration. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StartupApplicationListener.java    From spring-boot-graal-feature with Apache License 2.0 5 votes vote down vote up
private boolean isSpringBootApplication(Set<Class<?>> sources) {
    for (Class<?> source : sources) {
        if (AnnotatedElementUtils.hasAnnotation(source,
                SpringBootConfiguration.class)) {
            return true;
        }
    }
    return false;
}
 
Example #2
Source File: ShutdownApplicationListener.java    From spring-boot-graal-feature with Apache License 2.0 5 votes vote down vote up
private boolean isSpringBootApplication(Set<Class<?>> sources) {
    for (Class<?> source : sources) {
        if (AnnotatedElementUtils.hasAnnotation(source,
                SpringBootConfiguration.class)) {
            return true;
        }
    }
    return false;
}
 
Example #3
Source File: StartupApplicationListener.java    From spring-init with Apache License 2.0 5 votes vote down vote up
private boolean isSpringBootApplication(Set<Class<?>> sources) {
	for (Class<?> source : sources) {
		if (AnnotatedElementUtils.isAnnotated(source, SpringBootConfiguration.class)) {
			return true;
		}
		if (source.getName().endsWith("BootstrapMarkerConfiguration")) {
			return true; // sigh, Spring Cloud
		}
	}
	if (sources.contains(Object.class)) {
		// TODO: find a better marker class for a Spring Init application
		return true;
	}
	return false;
}
 
Example #4
Source File: ShutdownApplicationListener.java    From spring-init with Apache License 2.0 5 votes vote down vote up
private boolean isSpringBootApplication(Set<Class<?>> sources) {
	for (Class<?> source : sources) {
		if (AnnotatedElementUtils.hasAnnotation(source,
				SpringBootConfiguration.class)) {
			return true;
		}
	}
	return false;
}
 
Example #5
Source File: FunctionClassUtils.java    From spring-cloud-function with Apache License 2.0 4 votes vote down vote up
private static boolean isSpringBootApplication(Class<?> startClass) {
	return startClass.getDeclaredAnnotation(SpringBootApplication.class) != null
			|| startClass.getDeclaredAnnotation(SpringBootConfiguration.class) != null;
}