由于最近新做的项目里有用到flex做图形展示,而之前的项目都是用springMVC搭的框架,而spring有支持flex的jar包,于是就想搭这个环境,由于网上关于spring与flex搭配环境的文章太少,英文原文档又看不懂,结果花了一天时间,终于搞定。在这里记录下新手遇到的错误及解决方法。
spring jar包: spring-3.2,flex用的是:blazeds-turnkey-4.0.1;
第一步,配置springMVC
web.xml的其他配置的spring信息就不贴了,在这只贴了新手在做flex时疑惑的代码
spring mvc servlet
springMvc
org.springframework.web.servlet.DispatcherServlet
spring mvc 配置文件
contextConfigLocation
classpath:applicationContext-mvc.xml
1
springMvc
*.htm
这里我是手动指定了mvc的配置文件.
其他的application配置文件我就不贴了。
后台测试的java代码:
@Controller
@RequestMapping("/general")
public class GeneralController {
@RequestMapping(params="index")
public String index(){
System.out.prin