The latest springboot using mybatis-spring-stater 3.0.2 throw exception "Invalid value type for attribute 'factoryBeanObjectType': java.lang.String"
aalx opened this issue · comments
Springboot Version 3.2.0-M2,spring-boot-starter 3.0.2
In this version ,FactoryBeanRegistrySupport.getTypeForFactoryBeanFromAttributes() method has been changed,throw a IllegalArgumentException when "factoryBeanObjectType" not ResolvableType、Class type。But in ClassPathMapperScanner.processBeanDefinitions() menthod ( line 277) set a String type with beanClassName,
I had the same problem when I wanted to use spring-boot 3.2.0-M2
and mybatis-spring-boot-starter 3.0.2
, spring-boot 3.2.0-M2
depends on spring-beans 6.1.0-M4
. Changing the spring.version in pom.xml
file to <spring.version>6.1.0-M4</spring.version>
and then running the test can reproduce the problem. It throws an exception when running into ResolvableType getTypeForFactoryBeanFromAttributes(AttributeAccessor attributes) method. I don't know much about mybatis-spring, maybe it can be fixed when the spring-beans 6.1 is released.
The doc states that mybatis-spring-boot-starter 3.0 is not compatible with spring-boot 3.2, so @kazuki43zoo is aware of the issue probably.
https://mybatis.org/spring-boot-starter/mybatis-spring-boot-autoconfigure/#requirements
@aalx @StreamLuna (cc: @harawata )
Thanks for your feedback! I'll fix this issue ASAP.
@aalx @StreamLuna
I've fixed via #865. Please try 3.0.3-SNAPSHOT! and we will release 3.0.3 as GA version ASAP.
I noticed that spring boot 3.2 GA is published, I think the 3.0.3 GA should be scheduled.