Skip to main content

Springboot upgraded from 3.1.5 to 3.2.0 and reported Invalid value type for attribute 'factoryBeanObjectType': java.lang.String

This problem occurred because my springboot upgraded from 3.1.5 to 3.2.0.

1.png

Position the idea and debug directly:

2.png

debug can see some error bean information:

3.png

You should be able to see from here that there is a problem with mybatils.

It’s easier to locate the cause, then deal with it:

  1. Since mybatils is used, the first thing that comes to mind should be The package version of mybatis-spring should be relatively low, so springboot3.2 is not supported.

  2. Since I am using mybatilsplus here , I can actually postpone the upgrade to 3.2 and wait for a while before upgrading mybatilsplus. The current mybatis-spring of mybatilsplus is 2.1.1, which is relatively low. I believe that mybatilsplus will be upgraded soon. .

If you are springboot3+, it is recommended to use this dependency coordinate to solve the problem:

<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
<version>3.5.5</version>
</dependency>

4.png