您的位置:首页 > 编程语言 > Java开发

Spring 常用标签

2014-08-05 09:25 155 查看
1.引入properties。<context:property-placeholder location="classpath:com/foo/jdbc.properties"/> 相当于:

<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>classpath:com/foo/strategy.properties</value>
</property>
<property name="properties">
<value>custom.strategy.class=com.foo.DefaultStrategy</value>
</property>
</bean>
2.扫描类路径。<context:component-scan base-package="org.example"/>
未完待续。。。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: