Skip to content

The MapperScannerConfigurer should support FactoryBeans #964

Description

@missfmaster

in MapperScannerConfigurer.java:

private String getPropertyValue(String propertyName, PropertyValues values) {
    PropertyValue property = values.getPropertyValue(propertyName);

    if (property == null) {
      return null;
    }

    Object value = property.getValue();

    if (value == null) {
      return null;
    } else if (value instanceof String) {
      return value.toString();
    } else if (value instanceof TypedStringValue) {
      return ((TypedStringValue) value).getValue();
    } else {
      return null;
    }
  }

but my value is RuntimeBeanReference ( implements FactoryBean ),
be set:

builder.addPropertyReference("basePackage", basePackageBeanName);

so, value is null and get java.lang.IllegalArgumentException: At least one base package must be specified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions