spring bean 属性从配置文件读取

我在spring的xml文件中使用这个标签:

    <context:component-scan base-package="${serverPack}"/>

    启动${serverPack}从配置文件中获取,现在启动Tomcat出错.

要读取.properties文件读取的话 你需要在spring中配置一个PropertyPlaceholderConfigurer的bean,比如


classpath:/WEB-INF/jdbc.properties

;
如果你是要读取另一个xml配置文件中某个bean属性的话 ,你要先导入。。。