當前位置:
首頁 >
前端技术
> javascript
>内容正文
javascript
ssm(Spring+Spring mvc+mybatis)Spring配置文件——applicationContext-servlet.xml
生活随笔
收集整理的這篇文章主要介紹了
ssm(Spring+Spring mvc+mybatis)Spring配置文件——applicationContext-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"xmlns:util="http://www.springframework.org/schema/util"xmlns:mvc="http://www.springframework.org/schema/mvc"xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-3.1.xsdhttp://www.springframework.org/schema/contexthttp://www.springframework.org/schema/context/spring-context-3.1.xsdhttp://www.springframework.org/schema/mvchttp://www.springframework.org/schema/mvc/spring-mvc-3.1.xsdhttp://www.springframework.org/schema/utilhttp://www.springframework.org/schema/util/spring-util-3.1.xsd"><mvc:annotation-driven /><!-- HandlerMapping --> <bean class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping"/> <!-- HandlerAdapter --> <bean class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter"/> <!--掃描 @Controller注解的action --> <context:component-scan base-package="org.action" /><!-- 對模型視圖名稱的解析,即在模型視圖名稱添加前后綴 --> <!-- ViewResolver 視圖 --> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/> <property name="prefix" value="/"/> <!-- 視圖路徑 --> <property name="suffix" value=".jsp"/> <!-- 視圖后綴名 --></bean> </beans>
總結
以上是生活随笔為你收集整理的ssm(Spring+Spring mvc+mybatis)Spring配置文件——applicationContext-servlet.xml的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ssm(Spring+Spring mv
- 下一篇: 2022年5家最佳汽车经销商网站建设者