以如下开头的内容:
Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException:
### Error building SqlSession.
### The error may exist in SQL Mapper Configuration
出现以上问题是没有在src/main/resources下创建jdbc.properties。
jdbc的properties里面的内容是这样
jdbc.driver=com.mysql.cj.jdbc.Driver jdbc.url=jdbc:mysql://localhost:3306/user?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC jdbc.username=root jdbc.password=123456
保存记得后缀名是properties,名称是jdbc
里面的参数改成你的即可,注意第二行的url是对应我的mysql8.0版本的,mabatis用的是3.5.6