随笔分类 - MyBatis遇到的问题
摘要:SQL: CREATE TABLE `tb_user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(20) DEFAULT NULL, `password` varchar(20) DEFAULT NULL, `gender`
阅读全文
摘要:解决Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registere
阅读全文
摘要:解决The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (v
阅读全文
摘要:先放源代码: 1 @org.junit.Test 2 public void addInitBlog(){ 3 SqlSession session = MybatisUtils.getSqlSession(); 4 BlogMapper mapper = session.getMapper(Blo
阅读全文
摘要:在学习狂神的Mybatis课程的过程中,我在main文件中进行了一次测试,却发现 @Test 标签爆红,且junit包无法导入。 经过请教大佬@瓜哥 以及翻看课程弹幕,顺利(坎坷)地找到了解决方法: 删除pom.xml文件中junit属性的<scope>test</scope>标签。 结果图: 完成
阅读全文
摘要:后记:在学习完这个课程的第三天,我又一次编写了相似的代码,然后又一次遇到了同样的问题。经过上次的解决问题后,我有了丰富的经验。我迅速地检查了代码,发现不是路径对应的问题,而是像上次一样,resource资源包名的问题。我坚定而自信地更改了包的名字,然后运行了test。....... Exceptio
阅读全文
摘要:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)问题,即在mybatis中dao接口与mapper配置文件在做映射绑定的时候出现问题,简单说,就是接口与xml要么是找不到,要么是找到了却匹配
阅读全文