- 博客(3)
- 资源 (6)
- 收藏
- 关注
原创 spring ApplicationContext#getBean 方法
今天写代码的时候想通过类型去获取spring容器中的某个bean实例,最简单的办法就是通过SessionFactory sessionFactory = ctx.getBean(SessionFactory.class);这种形式,既简单又不需要处理类型安全问题,但是该方法带来一个问题就是,如果spring容器中找不到类型为 SessionFactory.class 的实例,则会抛出 NoSu
2012-06-22 18:15:35 2380
原创 解决 log4j 在 linux 上出现乱码的问题
使用log4j的时候,在WIN系统的时候正常显示中文,但是发布到linux系统的时候中文就显示成乱码了由于log4j配置文件中没有设置编码格式(encoding),所以log4j就使用系统默认编码。导致乱码。解决方法是设置编码格式UTF-8,方法为(有时改成UTF-8还是会乱码,需要设置成GBK,这可能跟你输入的字符的编码有关):log4j.appender.logfile.encod
2012-06-07 20:43:59 4044
原创 tomcat 中配置 access log 监控每个 http request 的处理时间
tomcat 6的配置官方文档:http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html 在 conf/server.xml 中配置 元素,可以在(Context, Host, or Engine) 等元素下配置 direct
2012-06-05 17:46:03 3168
Linux下oracle 11g的安装
2012-04-29
省市区数据使用JS静态化
2010-08-29
HttpWatch 6.1.41
2009-08-08
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人