cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Updating JAXRS spring boot scan demo to use HelloService interface
Date Thu, 09 Jun 2016 09:47:53 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 553be8f2a -> 06fbd75b7


Updating JAXRS spring boot scan demo to use HelloService interface


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/06fbd75b
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/06fbd75b
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/06fbd75b

Branch: refs/heads/3.1.x-fixes
Commit: 06fbd75b77597a6b413c72ab845578ba03bf3a21
Parents: 553be8f
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Thu Jun 9 10:43:40 2016 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Thu Jun 9 10:47:11 2016 +0100

----------------------------------------------------------------------
 .../jax_rs/jaxrs_spring_boot_scan/pom.xml       |  6 ----
 .../rs/client/SampleRestClientApplication.java  |  6 ++--
 .../java/sample/rs/service/HelloService.java    | 34 ++++++++++++++++++
 .../rs/service/hello1/HelloServiceImpl1.java    | 33 ++++++++++++++++++
 .../rs/service/hello2/HelloServiceImpl2.java    | 36 ++++++++++++++++++++
 5 files changed, 106 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/06fbd75b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml
index 931dedd..32e88f0 100644
--- a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml
+++ b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/pom.xml
@@ -37,12 +37,6 @@
                 </exclusion>
             </exclusions>
         </dependency>
-        <dependency>
-            <groupId>cglib</groupId>
-            <artifactId>cglib-nodep</artifactId>
-            <version>2.2.2</version>
-        </dependency>
-        
     </dependencies>
     <build>
       <plugins>

http://git-wip-us.apache.org/repos/asf/cxf/blob/06fbd75b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/src/main/java/sample/rs/client/SampleRestClientApplication.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/src/main/java/sample/rs/client/SampleRestClientApplication.java
b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/src/main/java/sample/rs/client/SampleRestClientApplication.java
index 39e1bce..430a610 100644
--- a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/src/main/java/sample/rs/client/SampleRestClientApplication.java
+++ b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/src/main/java/sample/rs/client/SampleRestClientApplication.java
@@ -20,7 +20,7 @@ package sample.rs.client;
 
 import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
 
-import sample.rs.service.hello1.HelloServiceImpl1;
+import sample.rs.service.HelloService;
 
 
 public final class SampleRestClientApplication {
@@ -28,8 +28,8 @@ public final class SampleRestClientApplication {
         
     }
     public static void main(String[] args) {
-        HelloServiceImpl1 service = JAXRSClientFactory.create("http://localhost:8080/services/helloservice/",

-                                    HelloServiceImpl1.class);
+        HelloService service = JAXRSClientFactory.create("http://localhost:8080/services/helloservice/",

+                                    HelloService.class);
         System.out.println(service.sayHello("ApacheCxfUser"));
     }  
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/06fbd75b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/src/main/java/sample/rs/service/HelloService.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/src/main/java/sample/rs/service/HelloService.java
b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/src/main/java/sample/rs/service/HelloService.java
new file mode 100644
index 0000000..706b054
--- /dev/null
+++ b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/src/main/java/sample/rs/service/HelloService.java
@@ -0,0 +1,34 @@
+/**
+ * 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.rs.service;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+ 
+@Path("/sayHello")
+public interface HelloService {
+ 
+    @GET
+    @Path("/{a}")
+    @Produces(MediaType.TEXT_PLAIN)
+    String sayHello(@PathParam("a") String a);
+    
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/06fbd75b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/src/main/java/sample/rs/service/hello1/HelloServiceImpl1.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/src/main/java/sample/rs/service/hello1/HelloServiceImpl1.java
b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/src/main/java/sample/rs/service/hello1/HelloServiceImpl1.java
new file mode 100644
index 0000000..4ebe2bb
--- /dev/null
+++ b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/src/main/java/sample/rs/service/hello1/HelloServiceImpl1.java
@@ -0,0 +1,33 @@
+/**
+ * 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.rs.service.hello1;
+import org.springframework.stereotype.Service;
+
+import io.swagger.annotations.Api;
+import sample.rs.service.HelloService;
+ 
+@Api("/sayHello")
+@Service
+public class HelloServiceImpl1 implements HelloService {
+ 
+    public String sayHello(String a) {
+        return "Hello " + a + ", Welcome to CXF RS Spring Boot World!!!";
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/06fbd75b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/src/main/java/sample/rs/service/hello2/HelloServiceImpl2.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/src/main/java/sample/rs/service/hello2/HelloServiceImpl2.java
b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/src/main/java/sample/rs/service/hello2/HelloServiceImpl2.java
new file mode 100644
index 0000000..23f8a1d
--- /dev/null
+++ b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot_scan/src/main/java/sample/rs/service/hello2/HelloServiceImpl2.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.rs.service.hello2;
+import javax.ws.rs.Path;
+
+import org.springframework.stereotype.Service;
+
+import io.swagger.annotations.Api;
+import sample.rs.service.HelloService;
+
+@Path("/sayHello2")
+@Api("/sayHello2")
+@Service
+public class HelloServiceImpl2 implements HelloService {
+ 
+    public String sayHello(String a) {
+        return "Hello2 " + a + ", Welcome to CXF RS Spring Boot World!!!";
+    }
+    
+}


Mime
View raw message