cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [01/17] cxf git commit: [CXF-6869] Switching JAX-RS demo to use a sample application without importing JaxRsConfig [Forced Update!]
Date Tue, 31 May 2016 00:36:51 GMT
Repository: cxf
Updated Branches:
  refs/heads/master-jaxrs-2.1 23d6d663f -> 97d71d2c9 (forced update)


[CXF-6869] Switching JAX-RS demo to use a sample application without importing JaxRsConfig


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

Branch: refs/heads/master-jaxrs-2.1
Commit: f5297d5620670274952ddf8173282832e65c8846
Parents: ecb6eba
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Fri May 27 10:51:34 2016 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Fri May 27 10:51:34 2016 +0100

----------------------------------------------------------------------
 .../src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml   | 4 ++--
 .../src/main/java/sample/rs/service/SampleRestApplication.java  | 5 ++---
 2 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/f5297d56/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml
index ceb3eff..d6762f8 100644
--- a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml
+++ b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/pom.xml
@@ -54,10 +54,10 @@
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
-               <!-- 
                <mainClass>sample.rs.service.SampleRestApplication</mainClass>
-               -->
+               <!--
                <mainClass>sample.rs.service.SampleScanRestApplication</mainClass>
+               --> 
            </configuration>  
         </plugin>
         <plugin>

http://git-wip-us.apache.org/repos/asf/cxf/blob/f5297d56/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/src/main/java/sample/rs/service/SampleRestApplication.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/src/main/java/sample/rs/service/SampleRestApplication.java
b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/src/main/java/sample/rs/service/SampleRestApplication.java
index a22997b..5338ca2 100644
--- a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/src/main/java/sample/rs/service/SampleRestApplication.java
+++ b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/src/main/java/sample/rs/service/SampleRestApplication.java
@@ -21,20 +21,18 @@ import java.util.Arrays;
 
 import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
-import org.apache.cxf.jaxrs.spring.JaxRsConfig;
+import org.apache.cxf.jaxrs.swagger.Swagger2Feature;
 import org.apache.cxf.transport.servlet.CXFServlet;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.context.embedded.ServletRegistrationBean;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Import;
 
 import sample.rs.service.hello1.HelloService;
 import sample.rs.service.hello2.HelloService2;
 
 @SpringBootApplication
-@Import(JaxRsConfig.class)
 public class SampleRestApplication {
     public static void main(String[] args) {
         SpringApplication.run(SampleRestApplication.class, args);
@@ -51,6 +49,7 @@ public class SampleRestApplication {
         JAXRSServerFactoryBean endpoint = new JAXRSServerFactoryBean();
         endpoint.setServiceBeans(Arrays.asList(new HelloService(), new HelloService2()));
         endpoint.setAddress("/helloservice");
+        endpoint.setFeatures(Arrays.asList(new Swagger2Feature()));
         return endpoint.create();
     }
  


Mime
View raw message