为节约键盘敲击次数,记PreparedStatement为PS, PreparedStatementCache为PSCache,并且所有的SQL使用的绑定变量。原理:http://www.dbafree.net/?p=287http://agapple.iteye.com/blog/838286http://singleant.iteye.com/blog/1298837使用:1. 使用ps.sql里用?占位,等待被替换。例如,select * from table1 where user_name = ? and age > ?2. 启用pscache。<bean id=&quo Read More
posted @ 2013-04-18 18:09 技术草根女 Views(14893) Comments(1) Diggs(0) Edit
今天看代码,发现log4j.properties。没有相应的加载代码,但它却生效了,这多神奇!看进去,org.apache.log4j,LogManager.java,其有一个static方法块: static { // By default we use a DefaultRepositorySelector which always returns 'h'. Hierarchy h = new Hierarchy(new RootLogger((Level) Level.DEBUG)); repositorySelector = new DefaultRepositor.. Read More
posted @ 2013-04-18 13:34 技术草根女 Views(8342) Comments(0) Diggs(4) Edit