随笔分类 -  框架探究-Spring

spring事务源码研读1
摘要:转载摘录自:Spring事务源码分析(一)Spring事务入门 有时为了保证一些操作要么都成功,要么都失败,这就需要事务来保证。 传统的jdbc事务如下: 设置Connection连接的自动提交为false,变成我们手动来控制commit时机。一旦操作一执行成功但是操作二执行失败,在捕获的异常中进行 阅读全文
posted @ 2016-11-29 11:44 Achris 阅读(291) 评论(0) 推荐(0)
spring in action 第五章基于注解搭建SpringMvc环境
摘要:request的生命历程 When the request leaves the browser ❶, it carries information about what the user is asking for. At the least, the request will be carryi 阅读全文
posted @ 2016-11-17 11:51 Achris 阅读(1024) 评论(0) 推荐(0)
Spring In action chapter1_wiringBeans
摘要:Automatically wiring beans Spring attacks automatic wiring from two angles: Component scanning—Spring automatically discovers beans to be created in t 阅读全文
posted @ 2016-11-10 14:51 Achris 阅读(422) 评论(0) 推荐(0)
Spring MVC+Spring +Hibernate配置事务,但是事务不起作用
摘要:最近做项目,被一个问题烦恼了很久。使用Spring MVC+Spring +Hibernate开发项目,在使用注解配置事务管理,刚开始发现无论如何数据库都无法更新,但是可以从数据库查询到数据。怀疑是配置文件的问题,但是反复确认,配置文件没有问题。后来将注解配置事务变更为注解配置事务,同样无法入库。 阅读全文
posted @ 2015-04-22 10:22 Achris 阅读(458) 评论(0) 推荐(0)
Spring MVC 上传文件
摘要:Spring MVC上传文件需要如下步骤: 1、前台页面,form属性 method设置为post,enctype="multipart/form-data" input的type类型设置为file。 2、引入jar包commons-fileupload.jar以及commons-io.jar包 3 阅读全文
posted @ 2015-04-03 18:25 Achris 阅读(132) 评论(0) 推荐(0)
Spring MVC学习初篇
摘要:Spring mvc 使用配置: defaultDispatcher org.springframework.web.servlet.DispatcherServlet contextConfigLocation ... 阅读全文
posted @ 2015-04-02 22:02 Achris 阅读(130) 评论(0) 推荐(0)