关于flex与blazeDS和spring配置的问题?

来源:百度知道 编辑:UC知道 时间:2024/06/23 08:21:01
我想在blazeDs和spring的配置中应用httpservice,我需要怎样配置呢?

Flex和Spring的整合:
1、将Spring的jar包拷贝到WEB-INF的lib下
2、在web.xml中注册Spring,如下配置:
<!-- Spring configuration file (Not needed if you don't use Spring) -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<!-- Spring ContextLoaderListener (Not needed if you don't use Spring) -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
3、增加SpringFactory.java,代码如下:
package com.samples.factories;
import org.springframework.context.ApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import flex.messaging.FactoryInstance;
impo