mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-05-02 19:30:23 +01:00
18 lines
305 B
Groovy
18 lines
305 B
Groovy
package org.test
|
|
|
|
@Grab("hsqldb")
|
|
|
|
@Configuration
|
|
@EnableTransactionManagement
|
|
class Example implements CommandLineRunner {
|
|
|
|
@Autowired
|
|
JdbcTemplate jdbcTemplate
|
|
|
|
@Transactional
|
|
void run(String... args) {
|
|
println "Foo count=" + jdbcTemplate.queryForObject("SELECT COUNT(*) from FOO", Integer)
|
|
}
|
|
}
|
|
|