1. 程式人生 > >Spring 常用標籤

Spring 常用標籤

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-scanbase-package="org.example"/>
未完待續。。。