分两工程创建,当然也可创建一个工程就可以
CMS Java Project Configuration
1 Create a java web project named CMS,its JavaEE specification level:JavaEE5.0
2 set file encoding
open IDE,choose Window-->Preferences menu to set all relevant files' encoding.
3 Add packages for CMS project according to Development Convensions.
4 add Spring2.5 capability and put its applicationContext.xml config file into the WEB-INF folder
5 add Hibernate3.2 capability,choose existed spring config file instead of hibernate config file
6 modify spring2.5 config file
6.1 replace the file header by using the following code:
<?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:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
6.2 add the following code in applicationContext.xml file
<bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<!-- the transactional advice (what 'happens'; see the <aop:advisor/> in others config file) -->
<tx:advice id="txAdvice" transaction-manager="txManager">
<!-- the transactional semantics... -->
<tx:attributes>
<!-- all methods starting with 'get' are read-only -->
<tx:method name="get*" read-only="true" />
<tx:method name="find*" read-only="true"/>
<!-- other methods use the default transaction settings (see below) -->
<tx:method name="*" />
</tx:attributes>
</tx:advice>
7 in the folder WEB-INF/config,add a new config file for module clinic,named clinic-applicationContext.xml.See also the file in the CMS project.
8 Add blazeDS capability
copy the lib required by blazeDS into the WEB-INF/lib folder,and copy the whole folder flex into the WEB-INF folder.
9 Modify the web.xml
add the following code:
<display-name>BlazeDS</display-name>
<description>BlazeDS Application</description>
<!-- spring support -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml,/WEB-INF/config/clinic-applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<!-- Http Flex Session attribute and binding listener support -->
<listener>
<listener-class>flex.messaging.HttpFlexSession</listener-class>
</listener>
<!-- MessageBroker Servlet -->
<servlet>
<servlet-name>MessageBrokerServlet</servlet-name>
<servlet-class>
flex.messaging.MessageBrokerServlet
</servlet-class>
<init-param>
<param-name>services.configuration.file</param-name>
<param-value>/WEB-INF/flex/services-config.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>MessageBrokerServlet</servlet-name>
<url-pattern>/messagebroker/*</url-pattern>
</servlet-mapping>
10 modify the services-config.xml file in the flex folder
append the following code
<factories>
<factory id="spring" class="com.versionsystem.framework.factory.SpringFactory.SpringFactory" />
</factories>
SpringFactory class references blazeds document
11 add log4j.properties file in the src folder,which will be used by log4j.
12 replace asm-2.2.3.jar,asm-commons-2.2.3.jar,asm-util-2.2.3.jar,asm.jar,asm-attrs.jar with asm-all.jar
CMS-Client Project Configuration
1create a flex project named CMS-Client
2 add folders according to Development Convensions
3add internationalization file
4create a folder named locale under the CMS-Client project,and add two folders in the locale folder:en_US,zh_CN.There is a properties file in every locale's sub-folder.
Open project CMS-Client properties window,add a folder according to following diagram:
5Add additional compiler arguments
-locale en_US zh_CN
6.Flex Server Configuration
- 大小: 34 KB
- 大小: 19.6 KB
- 大小: 48.8 KB
- 大小: 53.5 KB
分享到:
相关推荐
FLEX4+Gilead+BlazeDS+pureMVC+spring2.5 MVC+hibernate3.3+SLF4J+CXF2.3.0 以及相关插件
MyEclipse7.5+flex4+spring3.0.5+struts2.2.1+hibernate3.6.0+blazeds4.0.0.14931完美整合方案 内附所需jar包和源代码
Flex4+Blazeds4.0+Spring3.0+hibernate2.5.2整合笔记,自己看了不少网上所说,都没配置成功,后来通过spring的一个插件搞定了,希望对大家有帮助吧!
Flex PureMVC Flex BlazeDS Spring Hibernate 整合 里面一些图标是包双击可查看源代码
使用flex 4.5 + Spring 3.0 + Hibernate 3.3 + Cairngorm 2.2.1 + BlazeDS 3.3.0 + Spring BlazeDS Integration 1.0.3整合出的一个登录的小demo·
Myeclipse6.5+flex3+Blazeds+spring+hibernate完美整合,写的非常详细
Flex4+BlazeDS+Spring+Hibernate 整合源码博文源码
MyEclipse7.5+flex4+spring+struts+hibernate+blazeds整合
本课程主要是讲解Flex 4.6和ActionScript 3.0使用方法和技巧
Myeclipse6.5+flex3+Blazeds+spring+hibernate完美整合源代码,已经调试成功,可以运行。配有相应的word文档
本课程主要是讲解Flex 4.6和ActionScript 3.0使用方法和技巧
flex4+blazeds+spring+hibernate集成源码。内附完整jar包以及配置。给后来知道者帮助。
一步一步讲解了PureMVC+Flex+BlazeDS+Spring+Hibernate的搭建,适合初学者参照
跟我一步步搭建 PureMVC+Flex+BlazeDS+Spring+Hibernate
跟我一步步搭建PureMVC+Flex+BlazeDS+Spring+Hibernate
一步步搭建+PureMVC+Flex+BlazeDS+Spring+Hibernate
自己整合的flex4+spring3+struts2+hibernate3+blazeds整合实例 包含JAR包
Flex+Gilead+BlazeDS+Spring+Hibernate示例Demo,使用1:n和m:n两个双向关系,很好的演示了Gilead的Hibernate Lazy Killer特性,借助Gilead可以有效规避DTO模式的大量繁琐代码。效果图展示地址:...
flex+java+spring+hibernate+blazeds整合
此案例用到的框架是Flex+BlazeDS+Spring+Hibernate完成了三个案例的整合,用到的数据库脚本已经在项目中。只需要加压,在软件中导入,执行数据库脚本,项目就可以运行。