I am trying to set up Spring Boot with MyBatis. When I try and launch my application, I am getting the following error:
java.lang.annotation.AnnotationFormatError: Invalid default: public abstract java.lang.Class org.mybatis.spring.annotation.MapperScan.factoryBean()
at java.lang.reflect.Method.getDefaultValue(Method.java:611)
at sun.reflect.annotation.AnnotationType.<init>(AnnotationType.java:128)
at sun.reflect.annotation.AnnotationType.getInstance(AnnotationType.java:85)
at ...
at org.springframework.boot.SpringApplication.run(SpringApplication.java:301)
at com.mydomain.Server.launch(Server.java:70)
at com.mydomain.Server.main(Server.java:93)
I'm using the following versions in my pom.xml
in order to get things set up:
I also have the following included:
I'm not sure if there is a conflict or what, but it's not letting me set up my mappers. Any suggestions are happily welcomed.
OK - so the problem is a conflict between mybatis @ 3.4.5 and mybatis-spring @ 1.3.1.
When I dropped mybatis @ 3.4.5 everything worked just fine.