`
Fx_demon
  • 浏览: 4739 次
社区版块
存档分类
最新评论

1.Sping4.0.6+Hibernate4.5+SpingDataJPA1.6.0 +Spring BlazeDS Integration 1.5

 
阅读更多

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
       http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">

    <display-name>Spring Flex Mobile Test Drive</display-name>

    <!-- MessageBroker Servlet flex messagebroke 配置 -->
    <!---->
     <servlet>
        <servlet-name>flex</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/flex-servlet.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>flex</servlet-name>
        <url-pattern>/messagebroker/*</url-pattern>
    </servlet-mapping>

    <!--spring mvc 配置  -->
    <servlet>
        <servlet-name>spring-mvc</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/spring-mvc-servlet.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>spring-mvc</servlet-name>
        <url-pattern>/spring/*</url-pattern>
   </servlet-mapping>
   
   
    <!-- 著名 Character Encoding filter -->
    <filter>
        <filter-name>encodingFilter</filter-name>
        <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
        <init-param>
            <param-name>encoding</param-name>
            <param-value>UTF-8</param-value>
        </init-param>
    </filter>

    <!-- spring IOC -->
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            classpath*:/*_config.xml
            classpath*:/applicationContext.xml
        </param-value>
    </context-param>

    <!-- 设定Spring Context的默认Profile -->
    <context-param>
        <param-name>spring.profiles.default</param-name>
        <param-value>production</param-value>
    </context-param>
   
    <!-- blaseds监听器:用于获取服务器内置对象(request,application等) -->
    <listener>
        <listener-class>flex.messaging.HttpFlexSession</listener-class>
    </listener>

    <!--Spring ApplicationContext 载入 ,必须-->
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

    <!-- Spring 刷新Introspector防止内存泄露 -->
    <listener>
        <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
    </listener>

    <!-- session超时定义,单位为分钟 -->
    <session-config>
        <session-timeout>20</session-timeout>
    </session-config>
   
   
   
    <!--     添加 RDS 远程支持,用于远程数据服务
        messageBrokerId  引用到了flex-servlet.xml中定义的_messageBroker _messageBroker
        如果flex的工作也由myeclipse来做,那么RDSDispatchServlet的定义并非必需,flash builder的开发,则此处是必须的,
          并定义useAppserverSecurity 为 false
     -->
     <servlet>
        <display-name>RDSDispatchServlet</display-name>
        <servlet-name>RDSDispatchServlet</servlet-name>
        <servlet-class>flex.rds.server.servlet.FrontEndServlet</servlet-class>
        <init-param>
            <param-name>useAppserverSecurity</param-name>
            <param-value>false</param-value>
        </init-param>
         <init-param>
            <param-name>messageBrokerId</param-name>
            <param-value>_messageBroker</param-value>
        </init-param>
        <load-on-startup>10</load-on-startup>
    </servlet>
    <servlet-mapping id="RDS_DISPATCH_MAPPING">
        <servlet-name>RDSDispatchServlet</servlet-name>
        <url-pattern>/CFIDE/main/ide.cfm</url-pattern>
    </servlet-mapping>
   
   
   
   
     <welcome-file-list>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>

</web-app>

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics