Tools and backgrounds: IntelliJ idea 2016.1.3 Ultimate. Spring boot, MAVEN project, uses mybatis annotations to query MySQL.
Business logic Relationship: Controller-to-service interface----> Serverimpl--->dao-->daoimpl---> Mapper-->db
Issue: Mapper hint Could not autowire. No beans of ... type found?
Where Productdaomybatismapper is an interface for querying MySQL with structures such as:
workaround : Serialize the Productdaomybatis class in the first diagram to implement the serializable interface, such as:
Supplement: Pom.xml
<!--mybatis-->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.1.1</version>
</dependency>
Method Two: There is another way to modify the idea configuration, set the value of spring severity to "warning", as follows:
mybatis+spring boot, mapper hint could not autowire. No beans of ... type found