cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-6869] Autowiring a bus into a demo SampleRestApplication
Date Sun, 29 May 2016 19:59:04 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 7d16c1fe8 -> 5f0410688


[CXF-6869] Autowiring a bus into a demo SampleRestApplication


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

Branch: refs/heads/master
Commit: 5f04106886b9ce6253532919a0eaa677c38ed11a
Parents: 7d16c1f
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Sun May 29 20:58:49 2016 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Sun May 29 20:58:49 2016 +0100

----------------------------------------------------------------------
 .../src/main/java/sample/rs/service/SampleRestApplication.java | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/5f041068/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 c5ffb8e..d2d241e 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
@@ -19,9 +19,11 @@
 package sample.rs.service;
 import java.util.Arrays;
 
+import org.apache.cxf.Bus;
 import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
 import org.apache.cxf.jaxrs.swagger.Swagger2Feature;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.context.annotation.Bean;
@@ -31,6 +33,9 @@ import sample.rs.service.hello2.HelloService2;
 
 @SpringBootApplication
 public class SampleRestApplication {
+    @Autowired
+    private Bus bus;
+
     public static void main(String[] args) {
         SpringApplication.run(SampleRestApplication.class, args);
     }
@@ -38,6 +43,7 @@ public class SampleRestApplication {
     @Bean
     public Server rsServer() {
         JAXRSServerFactoryBean endpoint = new JAXRSServerFactoryBean();
+        endpoint.setBus(bus);
         endpoint.setServiceBeans(Arrays.asList(new HelloService(), new HelloService2()));
         endpoint.setAddress("/");
         endpoint.setFeatures(Arrays.asList(new Swagger2Feature()));


Mime
View raw message