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 2015/12/10 15:37:10 UTC

[1/2] cxf git commit: Adding a couple of more boot applications

Repository: cxf
Updated Branches:
  refs/heads/master 304c62a11 -> c32ebfa59


Adding a couple of more boot applications


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

Branch: refs/heads/master
Commit: 07c676da560681dd711ad208c51043dd1667282b
Parents: 9ecea37
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Thu Dec 10 14:36:16 2015 +0000
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Thu Dec 10 14:36:16 2015 +0000

----------------------------------------------------------------------
 .../samples/jax_rs/jaxrs_spring_boot/pom.xml    |  4 ++
 .../rs/service/SampleScanRestApplication.java   | 47 +++++++++++++
 .../rs/service/SampleScanRestApplication2.java  | 70 ++++++++++++++++++++
 3 files changed, 121 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/07c676da/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 ab6ddb1..e9cbd7c 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
@@ -66,6 +66,10 @@
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <mainClass>sample.rs.service.SampleRestApplication</mainClass>
+               <!-- 
+               <mainClass>sample.rs.service.SampleScanRestApplication</mainClass>
+               <mainClass>sample.rs.service.SampleScanRestApplication2</mainClass>
+               --> 
            </configuration>  
         </plugin>
         <plugin>

http://git-wip-us.apache.org/repos/asf/cxf/blob/07c676da/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/src/main/java/sample/rs/service/SampleScanRestApplication.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/src/main/java/sample/rs/service/SampleScanRestApplication.java b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/src/main/java/sample/rs/service/SampleScanRestApplication.java
new file mode 100644
index 0000000..c7643b2
--- /dev/null
+++ b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/src/main/java/sample/rs/service/SampleScanRestApplication.java
@@ -0,0 +1,47 @@
+/**
+ * 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 org.apache.cxf.jaxrs.spring.SpringComponentScanServer;
+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;
+
+@SpringBootApplication
+@Import(SpringComponentScanServer.class)
+public class SampleScanRestApplication {
+    public static void main(String[] args) {
+        SpringApplication.run(SampleScanRestApplication.class, args);
+    }
+ 
+    @Bean
+    public ServletRegistrationBean servletRegistrationBean(ApplicationContext context) {
+        return new ServletRegistrationBean(new CXFServlet(), "/services/helloservice/*");
+    }
+ 
+    
+    @Bean
+    public HelloService helloService() {
+        return new HelloService();
+    }
+ 
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/07c676da/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/src/main/java/sample/rs/service/SampleScanRestApplication2.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/src/main/java/sample/rs/service/SampleScanRestApplication2.java b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/src/main/java/sample/rs/service/SampleScanRestApplication2.java
new file mode 100644
index 0000000..97f3ed7
--- /dev/null
+++ b/distribution/src/main/release/samples/jax_rs/jaxrs_spring_boot/src/main/java/sample/rs/service/SampleScanRestApplication2.java
@@ -0,0 +1,70 @@
+/**
+ * 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 java.util.Collections;
+import java.util.Set;
+
+import javax.servlet.ServletConfig;
+import javax.ws.rs.ApplicationPath;
+import javax.ws.rs.core.Application;
+
+import org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet;
+import org.apache.cxf.jaxrs.spring.JaxRsConfig;
+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;
+
+@SpringBootApplication
+@Import(JaxRsConfig.class)
+public class SampleScanRestApplication2 {
+    public static void main(String[] args) {
+        SpringApplication.run(SampleScanRestApplication2.class, args);
+    }
+ 
+    @Bean
+    public ServletRegistrationBean servletRegistrationBean(ApplicationContext context) {
+        Application app = (Application)context.getBean("helloApp");
+        @SuppressWarnings("serial")
+        CXFNonSpringJaxrsServlet servlet = new CXFNonSpringJaxrsServlet(app) {
+            @Override
+            protected boolean isIgnoreApplicationPath(ServletConfig servletConfig) {
+                return false;
+            }
+            
+        };
+        return new ServletRegistrationBean(servlet, "/*");
+    }
+ 
+    
+    @Bean
+    public Application helloApp() {
+        return new JaxrsApplication();
+    }
+
+    @ApplicationPath("/services/helloservice")
+    public static class JaxrsApplication extends Application { 
+        public Set<Object> getSingletons() {
+            return Collections.<Object>singleton(new HelloService());
+        }
+    }
+    
+}


[2/2] cxf git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cxf

Posted by se...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cxf


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

Branch: refs/heads/master
Commit: c32ebfa59a67c8d34e1ffdd64e8821a28a04b752
Parents: 07c676d 304c62a
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Thu Dec 10 14:36:42 2015 +0000
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Thu Dec 10 14:36:42 2015 +0000

----------------------------------------------------------------------
 .../cxf/transport/jms/BackChannelConduit.java   | 106 ++++++++++---------
 1 file changed, 56 insertions(+), 50 deletions(-)
----------------------------------------------------------------------