arpho

servlet-context.xml

Jan 16th, 2014
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans:beans xmlns="http://www.springframework.org/schema/mvc"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xmlns:beans="http://www.springframework.org/schema/beans"
  5. xmlns:context="http://www.springframework.org/schema/context"
  6. xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
  7. http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
  8. http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
  9.  
  10. <!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure -->
  11.  
  12. <!-- Enables the Spring MVC @Controller programming model -->
  13. <annotation-driven />
  14.  
  15. <!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory -->
  16. <resources mapping="/resources/**" location="/resources/" />
  17.  
  18. <!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory -->
  19. <beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
  20. <beans:property name="prefix" value="/WEB-INF/views/" />
  21. <beans:property name="suffix" value=".jsp" />
  22. </beans:bean>
  23.  
  24. <context:component-scan base-package="com.metmi.mmasgis" />
  25.  
  26.  
  27.  
  28. <bean id="dataSource"
  29. class="org.springframework.jdbc.datasource.DriverManagerDataSource">
  30. <property name="driverClassName"
  31. value="com.mysql.jdbc.Driver">
  32. </property>
  33. <property name="username" value="root"></property>
  34. <property name="password" value="vilu7240"></property>
  35. <property name="url"
  36. value="jdbc:mysql://localhost:3306/springschema">
  37. </property>
  38. </bean>
  39. </beans:beans>
Advertisement
Add Comment
Please, Sign In to add comment