Added JDBC and @Transactional support to Groovy CLI

* @EnableTransactionManagement triggers spring-tx imports
* Field or method of type JdbcTemplate or NamedParameterJdbcTemplate
  of DataSource triggers spring-jdbc imports
This commit is contained in:
Dave Syer
2013-09-13 07:25:42 -07:00
parent 8ecec7e511
commit 621ecd3901
9 changed files with 174 additions and 2 deletions

View File

@@ -178,4 +178,11 @@ public class SampleIntegrationTests {
assertTrue("Wrong output: " + output, output.contains("Hello World"));
}
@Test
public void txSample() throws Exception {
start("samples/app.xml", "samples/tx.groovy");
String output = this.outputCapture.getOutputAndRelease();
assertTrue("Wrong output: " + output, output.contains("Foo count="));
}
}