摘要: 加载Spring配置文件时,如果Spring配置文件中所定义的Bean类实现了ApplicationContextAware 接口,那么在加载Spring配置文件时,会自动调用ApplicationContextAware 接口中的public void setApplicationConte... 阅读全文
posted @ 2014-07-31 18:01 QuantSeven 阅读(877) 评论(0) 推荐(0) 编辑
摘要: Spring3.x 获取properties资源文件的值有两种方式:第一种:使用标签然后在Spring的xml文件中就使用${jdbc.driver}获取第二种:使用 标签(1)在java文件中使用@Value("#{props['..']}")获取资源文件的值(2)在xml文件中使用#{props... 阅读全文
posted @ 2014-07-31 17:55 QuantSeven 阅读(938) 评论(0) 推荐(0) 编辑