- 博客(11)
- 资源 (6)
- 收藏
- 关注
原创 Hibernate获取当前Session,Hibernate清空当前Session的缓存
sessionFactory.getCurrentSession()sessionFactory.getCurrentSession().evict(object)其中,sqlSessionFactory,是通过spring注入的。先从网上盗张图,来看下Hibernate的三种状态以及生命周期。需求情景:每次update时,都要记录更新了什么字段,由什么值更新为什么值。所以使用的是Aop,在@aro
2016-12-21 16:19:29 2446 1
原创 Mybatis获取当前sqlSession,Mybatis清空当前Session的缓存
SqlSessionUtils.getSqlSession(sqlSessionFactory);SqlSessionUtils.getSqlSession(sqlSessionFactory).clearCache();其中,sqlSessionFactory,是通过spring注入的。需求情景:每次update时,都要记录更新了什么字段,由什么值更新为什么值。在@around方法中,joinPo
2016-12-21 15:26:40 11129 1
原创 如何遍历一个实例的所有属性,得到属性的名称和值
College college = this.collegeService.getCollegeById(id);try { Field[] fields = college.getClass().getDeclaredFields(); for (Field field : fields) { field.setAc
2016-12-19 10:40:31 2170
原创 遍历类的属性和值,取两个类的同一属性的不同值。
try { Field[] fields = college.getClass().getDeclaredFields(); Field[] fieldsOld = collegeOld.getClass().getDeclaredFields(); for (int i = 0; i < fields.length; i++)
2016-12-15 17:11:54 668
原创 Mybatis中调用mysql的函数
<select id="getSpellFull" parameterType="java.lang.String" resultType="java.lang.String"> SELECT getSpellFull(#{name}) FROM dual </select>
2016-12-15 13:18:01 23277 2
转载 eclipse插件安装列表
http://marketplace.eclipse.org/http://blog.csdn.NET/dyong525/article/details/6972623一直以来都用myeclipse,最近学习SOA,myeclipse安装不上插件,一气之下改用了eclipse。安装了必须的几个插件,刚开始不习惯,用多了也就习惯了。整理了一下我安装的ecl
2016-12-09 09:25:37 571
原创 Result Maps collection does not contain value for java.lang.Integer
我这个异常是当时拷贝的时候没仔细看导致的改成 resultType 就可以了。resultMap 和 resultType 的事例:
2016-12-02 17:34:46 11284
原创 (三)solr的dataimport的配置以及中文分词
1、先来个建表文件products.sql(mysql)链接:http://pan.baidu.com/s/1o8wGwuI 密码:wm8s2、在solr_home\solr\firstCore\conf下的solrconfig.xml中新增标签 <!-- 添加dataimporthandler标签 --> <lib dir="${solr.install.dir:../../../..}/c
2016-12-02 09:03:45 1424
原创 (二)Solr的安装配置及部署
下载solr下载地址:http://archive.apache.org/dist/lucene/solr/或去百度云盘链接:链接:http://pan.baidu.com/s/1o8wGwuI 密码:wm8s1、将solr-6.3.0\server\solr-webapp下的solr.war拷贝到apache-tomcat-8.5.8\webapps下,启动tomcat解压solr.war,解压完
2016-12-01 23:09:56 1995
sublime text 3 windows 64位
2018-05-30
Windows向Linux下传输文件
2017-02-05
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人