![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
浪里啦浪
JAVA工程师
展开
-
Hibernate4中使用getCurrentSession报Could not obtain transaction-synchronized Session for current thread
架个spring4+hibernate4的demo,dao层直接注入的sessionFactory,然后用getCurrentSession方法获取session,然后问题来了,直接报错: Could not obtain transaction-synchronized Session for current thread 提示无法获取当前线程的事务同步session,略微奇怪,转载 2017-06-18 11:49:08 · 373 阅读 · 0 评论 -
commons-io使用笔记
commons-io 是一款处理 io 流的工具,封装了很多处理 io 流和文件的方法,可以大大简化我们处理 io 流和操作文件的代码。从 common-io 的官方使用文档可以看出,它主要分为工具类、尾端类、行迭代器、文件过滤器、文件比较器和扩展流。 一、工具类 工具类包括 FileUtils、IOUtils、FilenameUtils 和 FileSystemUtils,前转载 2017-07-19 11:45:26 · 284 阅读 · 0 评论