summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/samples/helloworld-spring/src/main/java/sample/DateServiceImpl.java
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-07-28 21:01:53 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-07-28 21:01:53 +0000
commit79e4a1da4bb25df06acf70728a9d28463143fb10 (patch)
tree35db3a92c513af25c949d036f2f2ffcffe21305f /sca-java-2.x/trunk/samples/helloworld-spring/src/main/java/sample/DateServiceImpl.java
parent785dac0b33e8dad10dbb5a65e8f2f4280c29a517 (diff)
Add a DateService into helloworld-spring to demonstrate Java component wiring to a Spring component
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@980221 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/samples/helloworld-spring/src/main/java/sample/DateServiceImpl.java')
-rw-r--r--sca-java-2.x/trunk/samples/helloworld-spring/src/main/java/sample/DateServiceImpl.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/samples/helloworld-spring/src/main/java/sample/DateServiceImpl.java b/sca-java-2.x/trunk/samples/helloworld-spring/src/main/java/sample/DateServiceImpl.java
new file mode 100644
index 0000000000..2b3c412de3
--- /dev/null
+++ b/sca-java-2.x/trunk/samples/helloworld-spring/src/main/java/sample/DateServiceImpl.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package sample;
+
+import java.util.Date;
+
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ *
+ */
+@Service(DateService.class)
+public class DateServiceImpl implements DateService {
+
+ public Date getDate() {
+ return new Date();
+ }
+
+}