首先是Spring的配置文件
applicationContext.xml
<!-- 打开注解 --> <context:annotation-config/> <!-- 扫描包,一定要扫描到相应的VO类 --> <context:component-scan base-package="com.ssh.*" /> <!-- 加载properties文件,用于往javabean中注入 --> <bean name="myproperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean"> <property name="locations"> <list> <value>classpath:META-INF/app_config/properties/sysconfig.properties</value> <value>classpath:META-INF/app_config/properties/sysconfig-debug.properties</value> </list> </property> </bean> <!-- 加载properties文件,用于替换Spring 配置文件中的占位符变量(${varible}) --> <bean class="org.springframework.bea