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:
@@ -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="));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<include resource="org/springframework/boot/logging/logback/base.xml"/>
|
||||
<!-- logger name="org.springframework.web" level="DEBUG"/-->
|
||||
<!-- logger name="org.springframework.jdbc" level="DEBUG"/-->
|
||||
</configuration>
|
||||
|
||||
4
spring-boot-cli/src/test/resources/schema-all.sql
Normal file
4
spring-boot-cli/src/test/resources/schema-all.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
CREATE TABLE FOO (
|
||||
id INTEGER IDENTITY PRIMARY KEY,
|
||||
name VARCHAR(30),
|
||||
);
|
||||
Reference in New Issue
Block a user