You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ff...@apache.org on 2021/08/18 19:08:52 UTC

[cxf] branch 3.4.x-fixes updated: [CXF-8582]Add "CXF Additional Configuration" properties also as part of spring-configuration-metadata.json in cxf-spring-boot-autoconfigure.

This is an automated email from the ASF dual-hosted git repository.

ffang pushed a commit to branch 3.4.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/3.4.x-fixes by this push:
     new 56db0e2  [CXF-8582]Add "CXF Additional Configuration" properties also as part of spring-configuration-metadata.json in cxf-spring-boot-autoconfigure.
56db0e2 is described below

commit 56db0e20295f6edc140adeb631903dc7d0c66690
Author: Freeman Fang <fr...@gmail.com>
AuthorDate: Wed Aug 18 11:12:55 2021 -0400

    [CXF-8582]Add "CXF Additional Configuration" properties also as part of spring-configuration-metadata.json in cxf-spring-boot-autoconfigure.
    
    (cherry picked from commit bfb59ed997a5218156cff1b98fd6325103ff9cb4)
---
 .../spring/boot/autoconfigure/CxfProperties.java   | 94 ++++++++++++++++++++++
 1 file changed, 94 insertions(+)

diff --git a/integration/spring-boot/autoconfigure/src/main/java/org/apache/cxf/spring/boot/autoconfigure/CxfProperties.java b/integration/spring-boot/autoconfigure/src/main/java/org/apache/cxf/spring/boot/autoconfigure/CxfProperties.java
index 709ada5..0dd84c7 100644
--- a/integration/spring-boot/autoconfigure/src/main/java/org/apache/cxf/spring/boot/autoconfigure/CxfProperties.java
+++ b/integration/spring-boot/autoconfigure/src/main/java/org/apache/cxf/spring/boot/autoconfigure/CxfProperties.java
@@ -44,6 +44,8 @@ public class CxfProperties {
     private final Servlet servlet = new Servlet();
 
     private final Metrics metrics = new Metrics();
+    
+    private final JaxrsScan jaxrs = new JaxrsScan();
 
     @NotNull
     @Pattern(regexp = "/[^?#]*", message = "Path must start with /")
@@ -62,6 +64,10 @@ public class CxfProperties {
     public Metrics getMetrics() {
         return this.metrics;
     }
+    
+    public JaxrsScan getJaxrs() {
+        return this.jaxrs;
+    }
 
     public static class Servlet {
 
@@ -205,5 +211,93 @@ public class CxfProperties {
         }
 
     }
+    
+    public static class JaxrsScan {
+
+        
+        
+        /**
+         * property to create a JAX-RS endpoint from the auto-discovered JAX-RS 
+         * root resources and provider classes. Such classes do not have to be 
+         * annotated with Spring @Component. This property needs to be accompanied 
+         * by a "cxf.jaxrs.classes-scan-packages" property which sets a comma-separated 
+         * list of the packages to scan.
+         */
+        private boolean classesScan;
+        
+        /**
+         * property to create a JAX-RS endpoint from the auto-discovered 
+         * JAX-RS root resources and providers which are marked as Spring 
+         * Components (annotated with Spring @Component or created and 
+         * returned from @Bean methods).
+         */
+        private boolean componentScan;
+        
+        /**
+         * property to restrict which of the auto-discovered Spring components
+         * are accepted as JAX-RS resource or provider classes. It sets a 
+         * comma-separated list of the packages that a given bean instance's 
+         * class must be in. Note, this property, if set, is only effective
+         * if a given bean is a singleton. It can be used alongside or as
+         * an alternative to the "cxf.jaxrs.component-scan-beans" property. 
+         */
+        private String componentScanPackages;
+        
+        /**
+         * property to restrict which of the auto-discovered Spring components 
+         * are accepted as JAX-RS resource or provider classes. It sets a 
+         * comma-separated list of the accepted bean names - the auto-discovered 
+         * component will only be accepted if its bean name is in this list. 
+         * It can be used alongside or as an alternative to the 
+         * "cxf.jaxrs.component-scan-packages" property.  
+         */
+        private String componentScanBeans;
+        
+        private String classesScanPackages;
+        
+
+        public boolean isComponentScan() {
+            return componentScan;
+        }
+
+        public void setComponentScan(boolean componentScan) {
+            this.componentScan = componentScan;
+        }
+
+        public String getComponentScanPackages() {
+            return componentScanPackages;
+        }
+
+        public void setComponentScanPackages(String componentScanPackages) {
+            this.componentScanPackages = componentScanPackages;
+        }
+
+        public String getComponentScanBeans() {
+            return componentScanBeans;
+        }
+
+        public void setComponentScanBeans(String componentScanBeans) {
+            this.componentScanBeans = componentScanBeans;
+        }
+
+        public boolean isClassesScan() {
+            return classesScan;
+        }
+
+        public void setClassesScan(boolean classesScan) {
+            this.classesScan = classesScan;
+        }
+
+        public String getClassesScanPackages() {
+            return classesScanPackages;
+        }
+
+        public void setClassesScanPackages(String classesScanPackages) {
+            this.classesScanPackages = classesScanPackages;
+        }
+
+        
+        
+    }
 
 }