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-7483] Logging the debug message in case of the auto-wire failures
Date Wed, 23 Aug 2017 13:18:00 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 6edd2c9b2 -> b9fc1c5d5


[CXF-7483] Logging the debug message in case of the auto-wire failures


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

Branch: refs/heads/master
Commit: b9fc1c5d5ba3dfb9a7c853ac47ab41048d9e83e2
Parents: 6edd2c9
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Wed Aug 23 14:17:44 2017 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Wed Aug 23 14:17:44 2017 +0100

----------------------------------------------------------------------
 .../jaxrs/spring/JAXRSServerFactoryBeanDefinitionParser.java  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/b9fc1c5d/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanDefinitionParser.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanDefinitionParser.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanDefinitionParser.java
index aca3a4f..d6954df 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanDefinitionParser.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanDefinitionParser.java
@@ -24,6 +24,7 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
+import java.util.logging.Logger;
 
 import javax.ws.rs.Path;
 import javax.ws.rs.ext.Provider;
@@ -33,6 +34,7 @@ import org.w3c.dom.Element;
 
 import org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor;
 import org.apache.cxf.common.classloader.ClassLoaderUtils;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.ClasspathScanner;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser;
@@ -41,6 +43,7 @@ import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
 import org.apache.cxf.jaxrs.JAXRSServiceFactoryBean;
 import org.apache.cxf.jaxrs.lifecycle.ResourceProvider;
 import org.apache.cxf.jaxrs.model.UserResource;
+import org.apache.cxf.jaxrs.utils.ExceptionUtils;
 import org.apache.cxf.jaxrs.utils.ResourceUtils;
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.BeanCreationException;
@@ -55,7 +58,7 @@ import org.springframework.context.ApplicationContextAware;
 
 
 public class JAXRSServerFactoryBeanDefinitionParser extends AbstractBeanDefinitionParser
{
-
+    private static final Logger LOG = LogUtils.getL7dLogger(JAXRSServerFactoryBeanDefinitionParser.class);
 
     public JAXRSServerFactoryBeanDefinitionParser() {
         super();
@@ -272,6 +275,8 @@ public class JAXRSServerFactoryBeanDefinitionParser extends AbstractBeanDefiniti
             try {
                 bean = beanFactory.createBean(clazz, AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE,
true);
             } catch (Exception ex) {
+                String stackTrace = ExceptionUtils.getStackTrace(ex);
+                LOG.fine("Autowire failure for a " + clazz.getName() + " bean: " + stackTrace);
                 bean = beanFactory.createBean(clazz);
             }
             providers.add(bean);


Mime
View raw message