spring-mvc.xml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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" xmlns:context="http://www.springframework.org/schema/context"
  4. xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:aop="http://www.springframework.org/schema/aop"
  5. xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
  6. http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
  7. http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
  8. http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
  9. <!-- 自动扫描且只扫描@Controller -->
  10. <context:component-scan base-package="com.jtgh.yjpt.controller"
  11. use-default-filters="false">
  12. <context:include-filter type="annotation"
  13. expression="org.springframework.stereotype.Controller" />
  14. </context:component-scan>
  15. <mvc:annotation-driven />
  16. <mvc:resources location="/modeler/" mapping="/modeler/**" />
  17. <!-- file upload -->
  18. <bean id="multipartResolver"
  19. class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
  20. <!-- set the max upload size100MB -->
  21. <property name="maxUploadSize" value="104857600"></property>
  22. <property name="maxInMemorySize" value="4096"></property>
  23. <property name="defaultEncoding" value="UTF-8"></property>
  24. </bean>
  25. <!--aop:aspectj-autoproxy/-->
  26. <!-- 日志记录 -->
  27. <!--aop:config>
  28. <aop:pointcut expression="execution(* com.jtgh.yjpt.controller..*.*(..))" id="logAspect"/>
  29. <aop:aspect ref="logAop">
  30. <aop:after-returning pointcut-ref="logAspect" method="doLogAfterReturn"/>
  31. <aop:after-throwing pointcut-ref="logAspect" method="doLogAfterThrow"/>
  32. </aop:aspect>
  33. </aop:config-->
  34. <!--bean id="logAop" class="com.jtgh.yjpt.common.LogAop"/-->
  35. </beans>