File tree 2 files changed +16
-0
lines changed
src/test/java/org/springframework/boot
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 74
74
<artifactId >groovy</artifactId >
75
75
<optional >true</optional >
76
76
</dependency >
77
+ <dependency >
78
+ <groupId >org.codehaus.groovy</groupId >
79
+ <artifactId >groovy-xml</artifactId >
80
+ <optional >true</optional >
81
+ </dependency >
77
82
<dependency >
78
83
<groupId >org.eclipse.jetty</groupId >
79
84
<artifactId >jetty-webapp</artifactId >
Original file line number Diff line number Diff line change @@ -70,6 +70,17 @@ public void loadGroovyResource() throws Exception {
70
70
71
71
}
72
72
73
+ @ Test
74
+ public void loadGroovyResourceWithNamespace () throws Exception {
75
+ ClassPathResource resource = new ClassPathResource ("sample-namespace.groovy" ,
76
+ getClass ());
77
+ BeanDefinitionLoader loader = new BeanDefinitionLoader (this .registry , resource );
78
+ int loaded = loader .load ();
79
+ assertThat (loaded , equalTo (1 ));
80
+ assertTrue (this .registry .containsBean ("myGroovyComponent" ));
81
+
82
+ }
83
+
73
84
@ Test
74
85
public void loadPackage () throws Exception {
75
86
BeanDefinitionLoader loader = new BeanDefinitionLoader (this .registry ,
You can’t perform that action at this time.
0 commit comments