Add support for groovy utilities in "spring jar"
Also an integration test that uses the (new) @EnableGroovyTemplates to switch on the template conveniences in a non-webapp Fixes gh-990
This commit is contained in:
@@ -80,5 +80,7 @@ public class JarCommandIT {
|
||||
assertThat(invocation.getStandardOutput(), containsString("/static/static.txt"));
|
||||
assertThat(invocation.getStandardOutput(),
|
||||
containsString("/templates/template.txt"));
|
||||
assertThat(invocation.getStandardOutput(),
|
||||
containsString("Goodbye Mama"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.test
|
||||
|
||||
@EnableGroovyTemplates
|
||||
@Component
|
||||
class Example implements CommandLineRunner {
|
||||
|
||||
@@ -12,6 +13,7 @@ class Example implements CommandLineRunner {
|
||||
println getClass().getResource('/resources/resource.txt')
|
||||
println getClass().getResource('/static/static.txt')
|
||||
println getClass().getResource('/templates/template.txt')
|
||||
println template('template.txt', [world:'Mama'])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Goodbye ${world}
|
||||
Reference in New Issue
Block a user