设为首页 加入收藏

TOP

SSM衍生的配置文件(六)
2019-09-17 18:20:35 】 浏览:100
Tags:SSM 衍生 配置 文件
name>forceResponseEncoding</param-name>

        <param-value>true</param-value>

    </init-param>

  </filter>

  <filter-mapping>

    <filter-name>characterEncodingFilter</filter-name>

    <url-pattern>/*</url-pattern>

  </filter-mapping>

</web-app>
中央调度器(dispatcher.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: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.xsd

        http://www.springframework.org/schema/context

        http://www.springframework.org/schema/context/spring-context.xsd

        http://www.springframework.org/schema/mvc

        http://www.springframework.org/schema/mvc/spring-mvc.xsd">

 

    <!-- springmvc配置文件:定义视图层的对象:处理器对象, 视图对象 -->

    <!-- 声明组件扫描器,创建处理器对象 -->

    <context:component-scan base-package="com.bjpowernode.controllers" />

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

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

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

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

    </bean>

    <!-- 声明注解驱动 -->

    <mvc:annotation-driven />

    <!-- 处理静态资源 -->

    <mvc:resources location="/images/" mapping="/images/**" />

    <mvc:resources location="/js/" mapping="/js/**" />

   <!-- 声明组件扫描器,指定@Service, 创建Service对象 -->

   <context:component-scan base-package="com.bjpowernode.service" />

   <!-- 加载属性配置文件 -->

   <context:property-placeholder location="classpath:conf/jdbc.properties"/>

   <!-- 声明数据源DataSource, 使用druid数据库连接池 -->

   <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource">

        <property name="url" value="${jdbc.url}" />

        <property name="username" value="$

首页 上一页 3 4 5 6 7 下一页 尾页 6/7/7
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇千万级流量的优化策略实战 下一篇大型分布式电商系统架构是如何从0..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目