随笔分类 -  mybatis相关小出错经历

摘要:即Minister类作为Country类的关联属性。 查询的输出结果是:Country{id=2, name='美国', minister=[null]} <!--mapper.xml内容--> <!--第二次查询--> <select id="findMinisterById" resultTyp 阅读全文
posted @ 2019-12-05 08:57 凉心、惊梦 阅读(621) 评论(0) 推荐(0)
摘要:使用mybatis进行一对多嵌套查询时出错,错误原因: <select id="findMinisterById" resultMap="com.abc.beans.Minister"> select mid,mname from minister where countryId = #{cid} 阅读全文
posted @ 2019-12-04 20:13 凉心、惊梦 阅读(734) 评论(0) 推荐(0)
摘要:1.测试类 @Test public void test07() { IStudentDao studentDao = new IStudentDaoImpl(); Student student = studentDao.selectStudentById(10); System.out.prin 阅读全文
posted @ 2019-11-15 11:40 凉心、惊梦 阅读(346) 评论(0) 推荐(0)
摘要:log4j:WARN No appenders could be found for logger (org.apache.ibatis.logging.LogFactory).log4j:WARN Please initialize the log4j system properly.log4j: 阅读全文
posted @ 2019-11-15 11:01 凉心、惊梦 阅读(480) 评论(0) 推荐(0)