Use simplified @Grab where possible

This commit is contained in:
Dave Syer
2013-10-09 10:16:01 -04:00
parent 1dd0cca294
commit 3adfdd34ec
8 changed files with 13 additions and 46 deletions

View File

@@ -1,6 +1,6 @@
package org.test
@Grab("org.springframework.boot:spring-boot-starter-actuator:0.5.0.BUILD-SNAPSHOT")
@Grab("spring-boot-starter-actuator")
@Controller
class SampleController {

View File

@@ -6,15 +6,15 @@ class Example {
@RequestMapping("/")
@ResponseBody
public String helloWorld(Device device) {
String helloWorld(Device device) {
if (device.isNormal()) {
return "Hello Normal Device!"
"Hello Normal Device!"
} else if (device.isMobile()) {
return "Hello Mobile Device!"
"Hello Mobile Device!"
} else if (device.isTablet()) {
return "Hello Tablet Device!"
"Hello Tablet Device!"
} else {
return "Hello Unknown Device!"
"Hello Unknown Device!"
}
}

View File

@@ -1,6 +1,6 @@
package org.test
@Grab("org.hsqldb:hsqldb-j5:2.0.0")
@Grab("hsqldb")
@Configuration
@EnableBatchProcessing
class JobConfig {

View File

@@ -1,24 +0,0 @@
package org.test
@Grab('spring-boot-starter-web')
@Component
class Example implements CommandLineRunner {
@Autowired
private MyService myService
void run(String... args) {
print "Hello " + this.myService.sayWorld()
}
}
@Service
class MyService {
String sayWorld() {
return "World!"
}
}

View File

@@ -1,6 +1,6 @@
package org.test
@Grab("org.hsqldb:hsqldb:2.2.9")
@Grab("hsqldb")
@Configuration
@EnableTransactionManagement

View File

@@ -1,8 +1,6 @@
package app
import groovy.util.logging.Log
@Grab("org.thymeleaf:thymeleaf-spring3:2.0.16")
@Grab("thymeleaf-spring3")
@Controller
class Example {