checkConfigurationClassCandidate explicitly skips factory method definitions

Issue: SPR-14603
(cherry picked from commit 1fbd047)
This commit is contained in:
Juergen Hoeller
2017-08-01 12:05:26 +02:00
parent 57fbdc0ad5
commit 0088922dfd
2 changed files with 31 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -79,7 +79,7 @@ abstract class ConfigurationClassUtils {
*/
public static boolean checkConfigurationClassCandidate(BeanDefinition beanDef, MetadataReaderFactory metadataReaderFactory) {
String className = beanDef.getBeanClassName();
if (className == null) {
if (className == null || beanDef.getFactoryMethodName() != null) {
return false;
}