博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
springmvc.xml配置
阅读量:4670 次
发布时间:2019-06-09

本文共 1133 字,大约阅读时间需要 3 分钟。

<?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"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">

<!-- 扫描注解 @controller  @service-->

<context:component-scan base-package="包名"/>

<!-- 注解驱动  这个配置自动加载了  处理器映射器   处理器适配器-->

<mvc:annotation-driven>

<!--  视图解析器-->

 <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">

  <!-- 配置视图解析器的前缀  后缀,便于视图跳转-->

  <property name="prefix" value="/WEB-INF/jsp" />

  <!-- 此处的.jsp可以是自己起名  只要和视图的名后缀相同就好 -->

  <property name="suffix" value=".jsp"/>

</bean>

</beans>

转载于:https://www.cnblogs.com/doudou-123/p/9407714.html

你可能感兴趣的文章
pip安装第三方库以及版本
查看>>
一、app更新提示后台接口开发-(2)数据库表设计
查看>>
利用data-src属性 更换图片
查看>>
Spring(3)
查看>>
SSM整合 mybatis多条件查询与分页
查看>>
VS2010中dumpbin工具的使用
查看>>
使用Golang搭建web服务
查看>>
HTML5触摸事件(touchstart、touchmove和touchend)
查看>>
架构师软技能之协商(上)
查看>>
商品翻牌效果(纯css)
查看>>
win10 UWP 序列化
查看>>
读书心得
查看>>
前端知识整理 CSS盒模型
查看>>
sendmail 常见报错总结
查看>>
asp.net Response.AddHeader的方法来下载
查看>>
neo4j-访问提示No authorization header supplied.
查看>>
android-activity生命周期方法
查看>>
基于贪心算法的几类区间覆盖问题 nyoj 12喷水装置(二) nyoj 14会场安排问题...
查看>>
web之JavaScript
查看>>
HTML input 控件
查看>>