You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2016/06/09 09:43:57 UTC
cxf git commit: Updating JAXRS spring boot scan demo to use
HelloService interface
Repository: cxf
Updated Branches:
refs/heads/master fb48f17d1 -> e2bc8ebb2
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/e2bc8ebb
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e2bc8ebb
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e2bc8ebb
Branch: refs/heads/master
Commit: e2bc8ebb22c25073478aa99188d62ca3fff639a6
Parents: fb48f17
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Thu Jun 9 10:43:40 2016 +0100
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Thu Jun 9 10:43:40 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/e2bc8ebb/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 c3210bc0..03ef90a 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/e2bc8ebb/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/e2bc8ebb/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/e2bc8ebb/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/e2bc8ebb/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!!!";
+ }
+
+}