From 9dafe3e2c4d2476cb3ea7789e3f3063418340059 Mon Sep 17 00:00:00 2001 From: rfeng Date: Wed, 28 Jul 2010 21:01:41 +0000 Subject: Allow Spring WebApplicationContext to be used by Tuscany Bring up a sample web application which demonstrates the integration between Spring and Tuscany git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@980218 13f79535-47bb-0310-9956-ffa450edef68 --- .../helloworld-spring/src/main/java/sample/HelloworldImpl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sca-java-2.x/trunk/samples/helloworld-spring/src/main/java') diff --git a/sca-java-2.x/trunk/samples/helloworld-spring/src/main/java/sample/HelloworldImpl.java b/sca-java-2.x/trunk/samples/helloworld-spring/src/main/java/sample/HelloworldImpl.java index ac03ea3ca6..a44dcacc3a 100644 --- a/sca-java-2.x/trunk/samples/helloworld-spring/src/main/java/sample/HelloworldImpl.java +++ b/sca-java-2.x/trunk/samples/helloworld-spring/src/main/java/sample/HelloworldImpl.java @@ -18,11 +18,17 @@ */ package sample; +import org.oasisopen.sca.annotation.Reference; public class HelloworldImpl implements Helloworld { + @Reference(required = false) + private DateService dateService; public String sayHello(String name) { - return "Hello " + name; + if (dateService == null) { + return "Hello " + name; + } + return "[" + dateService.getDate() + "] Hello " + name; } } -- cgit v1.2.3