Change package names zero->boot
* actuator -> boot-ops * cli -> boot-cli * launcher -> boot-load * autoconfig -> boot-config * bootstrap -> boot-strap * starters -> boot-up [#54095231] [bs-253] Refactor Zero->Boot
This commit is contained in:
25
spring-boot-cli/samples/template.groovy
Normal file
25
spring-boot-cli/samples/template.groovy
Normal file
@@ -0,0 +1,25 @@
|
||||
package org.test
|
||||
|
||||
import static org.springframework.boot.cli.template.GroovyTemplate.template;
|
||||
|
||||
@Component
|
||||
class Example implements CommandLineRunner {
|
||||
|
||||
@Autowired
|
||||
private MyService myService
|
||||
|
||||
void run(String... args) {
|
||||
print template("test.txt", ["message":myService.sayWorld()])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Service
|
||||
class MyService {
|
||||
|
||||
String sayWorld() {
|
||||
return "World"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user