Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The MapperScannerConfigurer should support FactoryBeans #964

Open
missfmaster opened this issue Apr 22, 2024 · 1 comment
Open

The MapperScannerConfigurer should support FactoryBeans #964

missfmaster opened this issue Apr 22, 2024 · 1 comment

Comments

@missfmaster
Copy link

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.

@missfmaster
Copy link
Author

the version is mybatis-spring-3.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant