Thursday, June 20, 2013

Spring Hibernate - spring-mvc-servlet.xml


<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
        http://www.springframework.org/schema/beans    
        http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context-3.1.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">  
           
    <mvc:annotation-driven/>
    <context:component-scan base-package="bookstore.controller" />  
   
    <!--  View: /approot<PREFIX>VIEWNAME<SUFFIX> -->
    <!--  View: /approot/WEB-INF/views/addBook.jsp -->
    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
    <property name="prefix"> <value>/WEB-INF/views/</value> </property>
    <property name="suffix"> <value>.jsp</value></property>
    </bean>  

     <bean class="org.springframework.context.support.ResourceBundleMessageSource"
        id="messageSource">
        <property name="basename" value="messages" />
    </bean>
   
</beans>

No comments:

Post a Comment