springmvc.xml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xmlns:tx="http://www.springframework.org/schema/tx"
  5. xmlns:context="http://www.springframework.org/schema/context"
  6. xmlns:mvc="http://www.springframework.org/schema/mvc"
  7. xmlns:aop="http://www.springframework.org/schema/aop"
  8. xsi:schemaLocation="http://www.springframework.org/schema/beans
  9. http://www.springframework.org/schema/beans/spring-beans.xsd
  10. http://www.springframework.org/schema/context
  11. http://www.springframework.org/schema/context/spring-context.xsd
  12. http://www.springframework.org/schema/mvc
  13. http://www.springframework.org/schema/mvc/spring-mvc.xsd
  14. http://www.springframework.org/schema/tx
  15. http://www.springframework.org/schema/tx/spring-tx.xsd
  16. http://www.springframework.org/schema/aop
  17. http://www.springframework.org/schema/aop/spring-aop.xsd">
  18. <context:component-scan base-package="com.demo" />
  19. <mvc:annotation-driven>
  20. <mvc:message-converters>
  21. <bean class="org.springframework.http.converter.StringHttpMessageConverter"/>
  22. <bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"/>
  23. </mvc:message-converters>
  24. </mvc:annotation-driven>
  25. <aop:aspectj-autoproxy proxy-target-class="true" />
  26. <mvc:resources location="/js/" mapping="/js/**" />
  27. <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
  28. <property name="prefix" value="/WEB-INF/views/" />
  29. <property name="suffix" value=".jsp" />
  30. </bean>
  31. </beans>