2015年12月22日

spring 使用 context:property-placeholder 加载 多个 properties

摘要: 一般使用PropertyPlaceholderConfigurer来替换占位符,例如: classpath:com/foo/strategy.properties custom.strategy.class=com.foo.DefaultStrategy sprin... 阅读全文

posted @ 2015-12-22 14:22 陈惟鲜的博客 阅读(3219) 评论(0) 推荐(0) 编辑

Spring自动注入Bean

摘要: 通过@Autowired或@Resource来实现在Bean中自动注入的功能,但还要在配置文件中写Bean定义,下面我们将介绍如何注解Bean,从而从XML配置文件 中完全移除Bean定义的配置。1. @Component(不推荐使用)、@Repository、@Service、@Controlle... 阅读全文

posted @ 2015-12-22 13:01 陈惟鲜的博客 阅读(238) 评论(0) 推荐(0) 编辑

导航