Repository: cxf Updated Branches: refs/heads/3.1.x-fixes e4bfc1647 -> 12225d4f5
[CXF-6789] Adding a resource Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/12225d4f Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/12225d4f Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/12225d4f Branch: refs/heads/3.1.x-fixes Commit: 12225d4f560c30839fd8f2ecb6657663d7559a27 Parents: 3134609 Author: Sergey Beryozkin <[email protected]> Authored: Wed Feb 24 17:19:10 2016 +0000 Committer: Sergey Beryozkin <[email protected]> Committed: Wed Feb 24 17:19:52 2016 +0000 ---------------------------------------------------------------------- .../java/sample/rs/service/HelloService2.java | 42 ++++++++++++++++++++ 1 file changed, 42 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/12225d4f/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/src/main/java/sample/rs/service/HelloService2.java ---------------------------------------------------------------------- diff --git a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/src/main/java/sample/rs/service/HelloService2.java b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/src/main/java/sample/rs/service/HelloService2.java new file mode 100644 index 0000000..2421047 --- /dev/null +++ b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/src/main/java/sample/rs/service/HelloService2.java @@ -0,0 +1,42 @@ +/** + * 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; + +import org.springframework.stereotype.Service; + +import io.swagger.annotations.Api; + +@Path("/sayHello2") +@Service +@Api("/sayHello2") +public class HelloService2 { + + @GET + @Path("/{a}") + @Produces(MediaType.TEXT_PLAIN) + public String sayHello(@PathParam("a") String a) { + return "Hello2 " + a + ", Welcome to CXF RS Spring Boot World!!!"; + } + +}
