File tree Expand file tree Collapse file tree 5 files changed +9
-9
lines changed
spring-boot-project/spring-boot-cli/samples Expand file tree Collapse file tree 5 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import groovyx.net.http.*
77class Example implements CommandLineRunner {
88
99 @Autowired
10- ApplicationContext context;
10+ ApplicationContext context
1111
1212 @RequestMapping (" /" )
1313 @ResponseBody
@@ -16,7 +16,7 @@ class Example implements CommandLineRunner {
1616 }
1717
1818 void run (String ... args ) {
19- def port = context. webServer. port;
19+ def port = context. webServer. port
2020 def world = new RESTClient (" http://localhost:" + port). get(path :" /" ). data. text
2121 print " Hello " + world
2222 }
Original file line number Diff line number Diff line change @@ -5,11 +5,11 @@ package org.test
55class SpringIntegrationExample implements CommandLineRunner {
66
77 @Autowired
8- private ApplicationContext context;
8+ private ApplicationContext context
99
1010 @Bean
1111 DirectChannel input () {
12- new DirectChannel ();
12+ new DirectChannel ()
1313 }
1414
1515 @Override
Original file line number Diff line number Diff line change 11package org.test
22
3- import static org.springframework.boot.groovy.GroovyTemplate.*;
3+ import static org.springframework.boot.groovy.GroovyTemplate.*
44
55@Component
66class Example implements CommandLineRunner {
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ class Example {
77 @RequestMapping (" /" )
88 public String helloWorld (Map<String ,Object > model ) {
99 model. putAll([title : " My Page" , date : new Date (), message : " Hello World" ])
10- return " home" ;
10+ return " home"
1111 }
1212}
1313
Original file line number Diff line number Diff line change 22class Example {
33
44 @Autowired
5- private MyService myService;
5+ private MyService myService
66
77 @RequestMapping (" /" )
88 @ResponseBody
99 public String helloWorld () {
10- return myService. sayWorld();
10+ return myService. sayWorld()
1111 }
1212
1313}
@@ -16,6 +16,6 @@ class Example {
1616class MyService {
1717
1818 public String sayWorld () {
19- return " World!" ;
19+ return " World!"
2020 }
2121}
You can’t perform that action at this time.
0 commit comments