|
|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2002-2014 the original author or authors. |
|
|
|
* Copyright 2002-2016 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -17,6 +17,7 @@ |
|
|
|
package org.springframework.beans.factory; |
|
|
|
package org.springframework.beans.factory; |
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.beans.BeansException; |
|
|
|
import org.springframework.beans.BeansException; |
|
|
|
|
|
|
|
import org.springframework.util.ClassUtils; |
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
@ -74,7 +75,7 @@ public class NoSuchBeanDefinitionException extends BeansException { |
|
|
|
* @param message detailed message describing the problem |
|
|
|
* @param message detailed message describing the problem |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public NoSuchBeanDefinitionException(Class<?> type, String message) { |
|
|
|
public NoSuchBeanDefinitionException(Class<?> type, String message) { |
|
|
|
super("No qualifying bean of type [" + type.getName() + "] is defined: " + message); |
|
|
|
super("No qualifying bean of type [" + ClassUtils.getQualifiedName(type) + "] is defined: " + message); |
|
|
|
this.beanType = type; |
|
|
|
this.beanType = type; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -85,7 +86,8 @@ public class NoSuchBeanDefinitionException extends BeansException { |
|
|
|
* @param message detailed message describing the problem |
|
|
|
* @param message detailed message describing the problem |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public NoSuchBeanDefinitionException(Class<?> type, String dependencyDescription, String message) { |
|
|
|
public NoSuchBeanDefinitionException(Class<?> type, String dependencyDescription, String message) { |
|
|
|
super("No qualifying bean of type [" + type.getName() + "] found for dependency" + |
|
|
|
super("No qualifying bean" + (!StringUtils.hasLength(dependencyDescription) ? |
|
|
|
|
|
|
|
" of type [" + ClassUtils.getQualifiedName(type) + "]" : "") + " found for dependency" + |
|
|
|
(StringUtils.hasLength(dependencyDescription) ? " [" + dependencyDescription + "]" : "") + |
|
|
|
(StringUtils.hasLength(dependencyDescription) ? " [" + dependencyDescription + "]" : "") + |
|
|
|
": " + message); |
|
|
|
": " + message); |
|
|
|
this.beanType = type; |
|
|
|
this.beanType = type; |
|
|
|
|