- 博客(4)
- 资源 (2)
- 收藏
- 关注
原创 spring集成redis
1. 依赖包安装pom.xml 加入:[html] view plain copy print?<!-- redis cache related.....start --> <dependency> <groupId>org.springframework.data</groupId> ...
2017-04-24 14:50:47 116
原创 Spring执行吧bean初始化方法的两种方式
InitializingBean接口为bean提供了初始化方法的方式,它只包括afterPropertiesSet方法,凡是继承该接口的类,在初始化bean的时候会执行该方法。测试程序如下:12345678910import org.springframework.beans.factory.InitializingBean;...
2017-04-10 13:52:40 181
原创 通过pinyin4j将汉字转换为拼音
pinyin4j提供了汉语转拼音的一个开源库, 支持多种拼音系统:汉语拼音、 通用拼音 、威氏拼音、注音二式、雅礼、 国语罗马字。 但是遗憾的是不支持多音字 首先下载jar包:http://pinyin4j.sourceforge.net/package ceshiOA;import net.sourceforge.pinyin4j.PinyinHelper;impo...
2017-04-06 16:24:25 295
原创 spring配置事务管理
首先配置hibernate的数据源和sessionfactory <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> ...
2017-04-05 15:19:06 86
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人