spring里配置多个属性文件与@Value

1,项目在spring里配置多个属性文件:

<bean id="propertyPlaceholderConfigurer"
		class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
		<property name="locations">
			<array>
				<value>classpath:jdbc.properties</value>
				<value>classpath:email-config.properties</value>

			</array>

		</property>
	</bean>

2,@Value注解使用注意事项
见收藏:https://blog.csdn.net/u010002184/article/details/80775804

猜你喜欢

转载自blog.csdn.net/qq_37514822/article/details/82958667