![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
springmvc
文章平均质量分 76
食仁魔法师
“The key to immortality is first living a life worth remembering.”
不朽人生关键在于过一种值得让人记住的人生
----李小龙
展开
-
springMVC整合hibernate的时候数据插入需要flush问题
hibernate中openSession和getCurrentSessionopenSession需要手动的管理事务,每次打开一个新的session getCurrentSession在当前线程中找一个session,如果没有则新建一个。不需要手动close,但是需要定义事务管理spring配合hibernate使用getCurrentSession由于使用getCurrentSession需要原创 2015-04-11 18:03:42 · 1558 阅读 · 0 评论 -
java定时任务
java定时任务实现方式 使用JDK提供的工具类实现 不普通Thread 类实现 使用TimerTask (java.util.Timer) java.util.concurrent.ScheduledExecutorService; 使用Quartz或者spring 其中方式一的实现中在后面有写到,会发现他没有自动启动的功能, 在实际项目中使用相对少些,可以了解,重点需要掌握第二种方式JDK中工原创 2015-04-14 23:27:54 · 731 阅读 · 1 评论 -
SpringMVC整合Thymeleaf模板
SpringMVC整合Thymeleaf模板之前的工作中用到了Thymeleaf 视图模板,用起来真的感觉还不错,下面介绍下SpringMVC + thymeleaf模板的整合 thymeleaf官方在github上面的宠物店示例,可以在github上面下载下来研究下下面介绍下整合的方法: 关于springMVC的项目搭建就不多介绍了。网上可以找到很多例子 本文主要讲的是如何加入thymeleaf原创 2015-03-23 11:47:46 · 23321 阅读 · 1 评论