读书人

简略spring applicationContext和disp

发布时间: 2013-07-16 22:38:05 作者: rapoo

简单spring applicationContext和dispatcherServlet
<beans xmlns="http://www.springframework.org/schema/beans"
?xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
?xmlns:context="http://www.springframework.org/schema/context"
?xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
?<context:component-scan base-package="org.springframework.samples.petclinic.web" />

?<bean id="velocityConfig"
??value="/WEB-INF/velocity/" />
?</bean>
?<!-- View resolvers can also be configured with ResourceBundles or XML files.
??If you need different view resolving based on Locale, you have to use the
??resource bundle resolver. -->
?<bean id="viewResolver"
??value="true" />
??<property name="prefix" value="" />
??<property name="suffix" value=".vm" />
?</bean>
</beans>

?

读书人网 >开源软件

热点推荐