Advertisement
Guest User

Untitled

a guest
May 26th, 2015
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 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" xmlns:beans="http://www.springframework.org/schema/beans"
  4. xmlns:context="http://www.springframework.org/schema/context"
  5. xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
  6. http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
  7. http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
  8.  
  9. <!-- DispatcherServlet Context: defines this servlet's request-processing
  10. infrastructure -->
  11. <context:component-scan base-package="com.iosr.search" />
  12. <!-- Enables the Spring MVC @Controller programming model -->
  13. <annotation-driven />
  14.  
  15. <!-- Handles HTTP GET requests for /resources/** by efficiently serving
  16. up static resources in the ${webappRoot}/resources directory -->
  17. <resources mapping="/resources/**" location="/resources/view" />
  18.  
  19. <!-- Resolves views selected for rendering by @Controllers to .jsp resources
  20. in the /WEB-INF/views directory -->
  21. <beans:bean
  22. class="org.springframework.web.servlet.view.InternalResourceViewResolver">
  23. <beans:property name="prefix" value="/WEB-INF/views/" />
  24. <beans:property name="suffix" value=".jsp" />
  25. </beans:bean>
  26.  
  27.  
  28. <beans:bean
  29. class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter">
  30. <beans:property name="messageConverters">
  31. <beans:list>
  32. <beans:ref bean="jsonMessageConverter" />
  33. </beans:list>
  34. </beans:property>
  35. </beans:bean>
  36.  
  37. <!-- Configure bean to convert JSON to POJO and vice versa -->
  38. <beans:bean id="jsonMessageConverter"
  39. class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
  40. </beans:bean>
  41.  
  42. <!-- Search Engine bean-->
  43. <beans:bean id="searchEngine"
  44. class="com.iosr.search.impl.SearchEngine">
  45. </beans:bean>
  46.  
  47. <!-- Associations Engine bean-->
  48. <beans:bean id="associationsEngine"
  49. class="com.iosr.search.impl.AssociationsEngine">
  50. </beans:bean>
  51.  
  52.  
  53. </beans:beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement