摘要: 项目结构 pom.xml web.xml springmvc-servlet.xml jdbc.properties Studentmapper.xml Sutdentmapper.java index.jsp home.jsp 阅读全文
posted @ 2019-07-14 22:53 ScoutDu 阅读(137) 评论(0) 推荐(0)
摘要: 项目结构 pom.xml web.xml springmvc-servlet.xml index.jsp 阅读全文
posted @ 2019-07-14 22:35 ScoutDu 阅读(167) 评论(0) 推荐(0)
摘要: 一级缓存:同一个sqlsession里面存在,缓存用map存储。 key:sqlsession.hashcode+statementId+sql value:查询出来的对象。 二级缓存:不同sqlsession之间共享查询结果集。 1、 在配置文件SqlMapConfig.xml中加入以下内容(开启 阅读全文
posted @ 2019-07-14 19:49 ScoutDu 阅读(8034) 评论(2) 推荐(0)
摘要: 他们之间的区别用最直接的话来说就是:#相当于对数据 加上 双引号,$相当于直接显示数据。 1、#对传入的参数视为字符串,也就是它会预编译,select * from user where name = #{name},比如我传一个csdn,那么传过来就是 select * from user whe 阅读全文
posted @ 2019-07-14 19:42 ScoutDu 阅读(210) 评论(0) 推荐(0)