Use simplified @Grab where possible
parent
1dd0cca294
commit
3adfdd34ec
@ -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!"
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue