- 博客(8)
- 收藏
- 关注
原创 6、SERVLET API中forward() 与redirect()的区别?
答题思路: 实质:控制权的转向----完全的跳转 特点:效率:forward()高、 安全:forward() 转到其他服务器,必须用sendRedirect()方法 答:前者仅是容器中控制权的转向,在客户端浏览器地址栏中不会显示出转向后的地址;后者则是完全的跳转,浏览器将会得到跳转的地址,并重新发送请求链接。这样,从浏览器的地址栏中可以看
2016-08-12 19:15:27
518
原创 使用 ssh框架 hibernate的save(entity)时执行到select hibernate_sequence.nextval from dual 就停了
使用 ssh框架 hibernate的save(entity)时执行到select hibernate_sequence.nextval from dual 就停了 原因:1 事务 没有没配 2 我原来的aop是 : 实际应该为: expression="e
2016-08-10 16:46:25
807
原创 Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushM
org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' mar
2016-08-09 16:10:14
310
原创 如何理解hibernate
答题思路:为什么要使用hibernatehibernate实质是什么,如何实现hibernate一 为什么要使用hibernate1. 面向对象设计的软件内部运行过程可以理解成就是在不断创建各种新对象、建立对象之间的关系,调用对象的方法来改变各个对象的状态和对象消亡的过程,不管程序运行的过程和操作怎么样,本质上都是要得到一个结果,程序上一个时刻和下一个时刻的运行结果的差
2016-08-09 15:47:02
274
转载 Struts2中关于"There is no Action mapped for namespace / and action name"的总结
一、struts.xml文件错误。这种错误又分为以下几种:1,struts.xml文件名错误。一定要注意拼写问题;2,struts.xml文件放置路径错误。一定要将此文件放置在src目录下。编译成功后,要确认是否编译到classes目录中;3,struts.xml文件内容错误。下面给出一个正确的struts.xml文件以供参考。注意背景色部分。如果排除了struts.xml文件的问题,
2016-08-07 19:13:29
266
3
原创 PreparedStatement 比Statement 比较
1 preparedStatement 比Statement 效率高。为什么?因为:PreparedStatement是在执行前先输入sql语句,Statement正好相反,是在执行的时候传入sql语句的。这样的区别在于,PreparedStatement可以在传入sql后,执行语句前,给参数赋值,避免了因普通的拼接sql字符串语句所带来的安全问题,而且准备sql和执行sql是在两个语
2016-08-07 19:07:51
501
4
原创 a different object with the same identifier value was already associated with the session:
查找了两次报销单,session中有两个报销单,所以更新数据的时候,报了个错误 a different object with the same identifier value was already associated with the session:
2016-07-28 14:50:29
274
原创 springmvc
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 2原因:数据库中有
2016-07-26 22:35:21
166
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人