Error: java.lang.annotation.AnnotationFormatError: Invalid default: public abstract java.lang.Class org.mybatis.spring.annotation.MapperScan.factoryBean()
Error screenshot:
Solution:
1. Add dependencies to the pom.xml file, and wait for the pom.xml file to be updated successfully.
org.mybatis.spring.boot
mybatis-spring-boot-starter
2.0.1
2. When I added it, I still reported an error. I searched for the reason for a long time. Later, I asked my classmate. He asked me if maven was reloaded.
I think I have been rebuilding through the idea at that time, and there is no error, but he told me so, I still tried it
Type in the terminal:
mvn clean
Then it shows that the packaging failed:
This is a dependency in my dependencies that does not have a specified version, and then I checked it carefully. I repeatedly referenced many packages, and after deleting a bit, the package was successful.
The project started successfully! Okay