Merge branch '1.5.x'

This commit is contained in:
Stephane Nicoll
2016-12-30 18:01:59 +01:00
48 changed files with 180 additions and 193 deletions

View File

@@ -16,14 +16,16 @@
package sample.parent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class HelloWorldService {
@Autowired
private ServiceProperties configuration;
private final ServiceProperties configuration;
public HelloWorldService(ServiceProperties configuration) {
this.configuration = configuration;
}
public String getHelloMessage(String name) {
return this.configuration.getGreeting() + " " + name;

View File

@@ -27,8 +27,12 @@ import org.springframework.util.StreamUtils;
@MessageEndpoint
public class SampleEndpoint {
private final HelloWorldService helloWorldService;
@Autowired
private HelloWorldService helloWorldService;
public SampleEndpoint(HelloWorldService helloWorldService) {
this.helloWorldService = helloWorldService;
}
@ServiceActivator
public String hello(File input) throws Exception {