办理临牌需要哪些材料:范spring mvc 配置文件

来源:百度文库 编辑:偶看新闻 时间:2024/05/04 22:38:25
--spring mvc -servlet.xml Xml代码
  1. version="1.0" encoding="UTF-8"?>
  2. xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
  4. xmlns:context="http://www.springframework.org/schema/context"
  5. xsi:schemaLocation="
  6. http://www.springframework.org/schema/beans
  7. http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  8. http://www.springframework.org/schema/context
  9. http://www.springframework.org/schema/context/spring-context-3.0.xsd
  10. http://www.springframework.org/schema/mvc
  11. http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
  12. base-package="com.cqa.cms.controllers" />
  13. id="handlerMapping"
  14. class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
  15. name="order" value="0" />
  16. id="jacksonMessageConverter"
  17. class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter">
  18. id="hostUserArgumentResolver" class="com.cqa.cms.resolvers.HostUserArgumentResolver"/>
  19. class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
  20. name="customArgumentResolver" ref="hostUserArgumentResolver" />
  21. name="messageConverters">
  22. bean="jacksonMessageConverter" />
  23. class="org.springframework.web.servlet.view.InternalResourceViewResolver"
  24. p:prefix="/WEB-INF/jsp/" p:suffix=".jsp" />
  25. name="maxInMemorySize" value="10240"/>
  26. name="uploadTempDir" value="/upload/"/>
  27. name="maxUploadSize" value="-1"/>

interceptor-servlet.xml

Xml代码
  1. version="1.0" encoding="UTF-8"?>
  2. default-autowire="byName" xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
  4. xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:util="http://springframework.org/schma/util"
  5. xmlns:context="http://www.springframework.org/schema/context"
  6. xsi:schemaLocation="
  7. http://www.springframework.org/schema/beans
  8. http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  9. http://www.springframework.org/schema/context
  10. http://www.springframework.org/schema/context/spring-context-3.0.xsd
  11. http://www.springframework.org/schema/mvc
  12. http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
  13. http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">
  14. path="/**" />
  15. class="com.cqa.cms.interceptors.LogInterceptor" />
  16. path="/admin/*" />
  17. class="com.cqa.cms.interceptors.AuthorizeInterceptor" />
  18. path="/**" />
  19. class="com.cqa.cms.interceptors.DefaultViewInterceptor" />
  20. location="/jslib/**" mapping="/jslib/**"/>
Xml代码

views.xml

Xml代码
  1. version="1.0" encoding="UTF-8"?>
  2. xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
  4. xmlns:tx="http://www.springframework.org/schema/tx"
  5. xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  6. http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
  7. http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"
  8. default-autowire="byName" default-lazy-init="true">
  9. name="jsonView"
  10. class="org.springframework.web.servlet.view.json.MappingJacksonJsonView" />

applicationContext-transaction.xml

Xml代码

  1. version="1.0" encoding="UTF-8"?>
  2. xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xmlns:aop="http://www.springframework.org/schema/aop"
  5. xmlns:tx="http://www.springframework.org/schema/tx"
  6. xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  7. http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
  8. http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"
  9. default-autowire="byName" default-lazy-init="true">
  10. id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
  11. name="dataSource" ref="dataSource"/>
  12. id="txAdvice" transaction-manager="transactionManager">
  13. name="add*" propagation="REQUIRED" rollback-for="Exception"/>
  14. name="delete*" propagation="REQUIRED" rollback-for="Exception"/>
  15. name="update*" propagation="REQUIRED" rollback-for="Exception"/>
  16. name="save*" propagation="REQUIRED" rollback-for="Exception"/>
  17. name="*" read-only="true" />
  18. id="serviceManager" expression="execution(* com.cqa.cms.service.impl.*Impl.*(..))"/>
  19. advice-ref="txAdvice" pointcut-ref="serviceManager"/>