解决方法1:
项目---->properties---->deployment assembly,添加删除至如下:
解决方法2:
在mybtis-config.xml中添加如下代码:
<environments default="development">
<environment id="development">
<transactionManager type="JDBC"/>
<dataSource type="POOLED">
<property name="driver" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://localhost:3306/shop?characterEncoding=utf8" />
<property name="username" value="root"/>
<property name="password" value="你的密码"/>
</dataSource>
</environment>
</environments>