You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
305 B
Groovy
18 lines
305 B
Groovy
11 years ago
|
package org.test
|
||
|
|
||
11 years ago
|
@Grab("hsqldb")
|
||
11 years ago
|
|
||
|
@Configuration
|
||
|
@EnableTransactionManagement
|
||
|
class Example implements CommandLineRunner {
|
||
|
|
||
11 years ago
|
@Autowired
|
||
|
JdbcTemplate jdbcTemplate
|
||
11 years ago
|
|
||
11 years ago
|
@Transactional
|
||
|
void run(String... args) {
|
||
|
println "Foo count=" + jdbcTemplate.queryForObject("SELECT COUNT(*) from FOO", Integer)
|
||
|
}
|
||
11 years ago
|
}
|
||
|
|