MyBatis-plus打包遇到问题记录
我的项目是Spring Boot整合了MyBatis-plus,maven引入如下
<!-- 持久层框架 mybatis-plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<!-- 代码生成器 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
</dependency>
遇到问题如下:
- 打成war包部署后报错,sqlSessionFactory is required,明明本地能跑,而打包部署后就报错了。网上说需要加入:
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId