mybatis2入门程序

第一步先搭建入门工程结构

    在src文件同级创建文件夹专门放mybatis配置文件

    工程结构如:

1.log4j2.sqlmapconfig.xml

    2.

 

关于碰到的问题:

   The method selectOne(String, Object) in the type SqlSession is not applicable for the arguments (String, int)

解决办法:

  更换jre或jdk然后在改回即可,(不明白为什么是这样)

参考连接:

https://bbs.csdn.net/topics/392156011

猜你喜欢

转载自www.cnblogs.com/Wision-22/p/10666089.html