File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed
grpc-client-spring-boot-autoconfigure
src/main/java/net/devh/boot/grpc/client/inject Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ dependencies {
15
15
16
16
api project(' :grpc-common-spring-boot' )
17
17
api ' org.springframework.boot:spring-boot-starter'
18
- api ' org.springframework.boot:spring-boot-starter-test'
19
18
optionalSupportImplementation ' org.springframework.boot:spring-boot-starter-actuator'
20
19
optionalSupportImplementation ' org.springframework.cloud:spring-cloud-starter-sleuth'
21
20
optionalSupportImplementation ' org.springframework.cloud:spring-cloud-starter-consul-discovery'
Original file line number Diff line number Diff line change 33
33
import org .springframework .beans .factory .BeanDefinitionStoreException ;
34
34
import org .springframework .beans .factory .config .BeanPostProcessor ;
35
35
import org .springframework .beans .factory .config .ConfigurableListableBeanFactory ;
36
- import org .springframework .boot .test .context .TestConfiguration ;
37
36
import org .springframework .context .ApplicationContext ;
38
37
import org .springframework .context .ConfigurableApplicationContext ;
39
38
import org .springframework .context .annotation .Configuration ;
@@ -325,15 +324,14 @@ private String getBeanName(final GrpcClientBean grpcClientBean) {
325
324
}
326
325
327
326
/**
328
- * The method is used to check for the presence of an annotation {@link Configuration} or {@link TestConfiguration}
327
+ * The method is used to check for the presence of an annotation {@link Configuration}
329
328
*
330
329
* @param clazz instance of the class
331
330
* @return does the class have an annotation or not
332
331
*/
333
332
private boolean isAnnotatedWithConfiguration (final Class <?> clazz ) {
334
- final Configuration [] configurationAnnotation = clazz .getAnnotationsByType (Configuration .class );
335
- final TestConfiguration [] testConfigurationAnnotation = clazz .getAnnotationsByType (TestConfiguration .class );
336
- return configurationAnnotation .length != 0 || testConfigurationAnnotation .length != 0 ;
333
+ final Configuration configurationAnnotation = AnnotationUtils .findAnnotation (clazz , Configuration .class );
334
+ return configurationAnnotation != null ;
337
335
}
338
336
339
337
}
You can’t perform that action at this time.
0 commit comments