Polish samples
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user