首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 互联网 >

spring 配备摘要

2012-10-21 
spring 配置摘要!-- 启用 annotation --context:annotation-config /?!-- 使用 annotation 自动注册b

spring 配置摘要

<!-- 启用 annotation -->
<context:annotation-config />

?

<!-- 使用 annotation 自动注册bean,并检查@Controller, @Service, @Repository注解已被注入 -->
<context:component-scan base-package="com.mapbar.mgisx.overlayobj" />

?

<!-- 环境文件加载 -->
<bean id="propertyPlaceholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
??? ??? <property name="locations">
??? ??? ??? <list>
??? ??? ??? ??? <value>classpath:config/environment/hibernate.properties</value>
??? ??? ??? ??? <value>classpath:config/environment/dbcp.properties</value>
??? ??? ??? ??? <value>classpath:config/environment/mongodb.properties</value>
??? ??? ??? </list>
??? ??? </property>
</bean>

热点排行