Commit 691f905c authored by Stephane Nicoll's avatar Stephane Nicoll

Merge pull request #24628 from andrey4623

* pr/24628:
  Polish "Remove unnecessary semicolon"
  Remove unnecessary semicolon

Closes gh-24628
parents 9928d74a f33c7bc2
...@@ -7,7 +7,7 @@ import groovyx.net.http.* ...@@ -7,7 +7,7 @@ import groovyx.net.http.*
class Example implements CommandLineRunner { class Example implements CommandLineRunner {
@Autowired @Autowired
ApplicationContext context; ApplicationContext context
@RequestMapping("/") @RequestMapping("/")
@ResponseBody @ResponseBody
...@@ -16,7 +16,7 @@ class Example implements CommandLineRunner { ...@@ -16,7 +16,7 @@ class Example implements CommandLineRunner {
} }
void run(String... args) { void run(String... args) {
def port = context.webServer.port; def port = context.webServer.port
def world = new RESTClient("http://localhost:" + port).get(path:"/").data.text def world = new RESTClient("http://localhost:" + port).get(path:"/").data.text
print "Hello " + world print "Hello " + world
} }
......
...@@ -5,11 +5,11 @@ package org.test ...@@ -5,11 +5,11 @@ package org.test
class SpringIntegrationExample implements CommandLineRunner { class SpringIntegrationExample implements CommandLineRunner {
@Autowired @Autowired
private ApplicationContext context; private ApplicationContext context
@Bean @Bean
DirectChannel input() { DirectChannel input() {
new DirectChannel(); new DirectChannel()
} }
@Override @Override
......
package org.test package org.test
import static org.springframework.boot.groovy.GroovyTemplate.*; import static org.springframework.boot.groovy.GroovyTemplate.*
@Component @Component
class Example implements CommandLineRunner { class Example implements CommandLineRunner {
......
...@@ -7,7 +7,7 @@ class Example { ...@@ -7,7 +7,7 @@ class Example {
@RequestMapping("/") @RequestMapping("/")
public String helloWorld(Map<String,Object> model) { public String helloWorld(Map<String,Object> model) {
model.putAll([title: "My Page", date: new Date(), message: "Hello World"]) model.putAll([title: "My Page", date: new Date(), message: "Hello World"])
return "home"; return "home"
} }
} }
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
class Example { class Example {
@Autowired @Autowired
private MyService myService; private MyService myService
@RequestMapping("/") @RequestMapping("/")
@ResponseBody @ResponseBody
public String helloWorld() { public String helloWorld() {
return myService.sayWorld(); return myService.sayWorld()
} }
} }
...@@ -16,6 +16,6 @@ class Example { ...@@ -16,6 +16,6 @@ class Example {
class MyService { class MyService {
public String sayWorld() { public String sayWorld() {
return "World!"; return "World!"
} }
} }
...@@ -6,7 +6,7 @@ public class Test implements CommandLineRunner { ...@@ -6,7 +6,7 @@ public class Test implements CommandLineRunner {
public void run(String... args) throws Exception { public void run(String... args) throws Exception {
println "HasClasses-" + ClassUtils.isPresent("missing", null) + "-" + println "HasClasses-" + ClassUtils.isPresent("missing", null) + "-" +
ClassUtils.isPresent("org.springframework.boot.SpringApplication", null) + "-" + ClassUtils.isPresent("org.springframework.boot.SpringApplication", null) + "-" +
ClassUtils.isPresent(args[0], null); ClassUtils.isPresent(args[0], null)
} }
} }
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
package org.test.command package org.test.command
import java.util.Collection; import java.util.Collection
class TestCommand implements Command { class TestCommand implements Command {
......
...@@ -5,7 +5,7 @@ package com.example ...@@ -5,7 +5,7 @@ package com.example
class RestTests { class RestTests {
@Autowired @Autowired
TestRestTemplate testRestTemplate; TestRestTemplate testRestTemplate
@Test @Test
void testHome() { void testHome() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment