在用Eclipse的开发中,可手动排除不必要的依赖坐标传递。
<!-- 通用Mapper --> <dependency> <groupId>tk.mybatis</groupId> <artifactId>mapper</artifactId> <exclusions> <exclusion> <groupId>javax.persistence</groupId> <artifactId>persistence-api</artifactId> </exclusion> </exclusions> </dependency>
JDBC驱动的依赖坐标最好在web子模块导入,作用域是runtime
============================================
end