• Spring XML配置文件示例(一)——<Servlet name>-servlet.xml


    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"     
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"     
            xmlns:context="http://www.springframework.org/schema/context"     
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd   
           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd   
           http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd   
           http://www.springframework.org/schema/context <a href="http://www.springframework.org/schema/context/spring-context-3.0.xsd">http://www.springframework.org/schema/context/spring-context-3.0.xsd</a>">
    
        <!-- 启用spring mvc 注解 -->
        <context:annotation-config />
    
        <!-- 设置使用注解的类所在的jar包 -->
        <context:component-scan base-package="com.baobaotao.web"></context:component-scan>
    
        <!-- 完成请求和注解POJO的映射 -->
        <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" />
      
        <!-- 对转向页面的路径解析。prefix:前缀, suffix:后缀 -->
        <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" 
                p:viewClass="org.springframework.web.servlet.view.JstlView"
                p:prefix="/WEB-INF/jsp/" 
                p:suffix=".jsp" />
    </beans>
  • 相关阅读:
    idea git使用记录
    会计科目中的借贷理解
    git使用合集
    Unsupported major.minor version 52.0
    sts问题合集
    idea导入工程
    (转)解决mybatis的mapper.xml查询不出数据,结果一直为null问题
    战争热诚的python全栈开发之路
    Python机器学习笔记:SVM(4)——sklearn实现
    Python机器学习笔记:SVM(3)——证明SVM
  • 原文地址:https://www.cnblogs.com/tq03/p/3598372.html
Copyright © 2020-2023  润新知