File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
src/test/java/org/springframework/boot Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 7474 <artifactId >groovy</artifactId >
7575 <optional >true</optional >
7676 </dependency >
77+ <dependency >
78+ <groupId >org.codehaus.groovy</groupId >
79+ <artifactId >groovy-xml</artifactId >
80+ <optional >true</optional >
81+ </dependency >
7782 <dependency >
7883 <groupId >org.eclipse.jetty</groupId >
7984 <artifactId >jetty-webapp</artifactId >
Original file line number Diff line number Diff line change @@ -70,6 +70,17 @@ public void loadGroovyResource() throws Exception {
7070
7171 }
7272
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+
7384 @ Test
7485 public void loadPackage () throws Exception {
7586 BeanDefinitionLoader loader = new BeanDefinitionLoader (this .registry ,
You can’t perform that action at this time.
0 commit comments