8 changed files with 13 additions and 46 deletions
@ -1,24 +0,0 @@
@@ -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