flex4+sdk4+spring3+hibernate3整合开发
2011-06-27 14:15
309 查看
所需环境:
flex4
sdk4
spring3
hibernate3
eclipse3.4
jdk1.6
tomcat6以上(必须是安装版)
spring配置文件:
<?xml version="1.0" encoding="UTF-8" ?>
- <beans xmlns="http://www.springframework.org/schema/beans" xmlns:flex="http://www.springframework.org/schema/flex" 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-3.0.xsd http://www.springframework.org/schema/flex http://www.springframework.org/schema/flex/spring-flex-1.0.xsd">
<flex:message-broker />
- <bean id="testService" class="com.longtop.test.TestService">
<flex:remoting-destination />
<property name="testDao" ref="testDao" />
</bean>
- <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost:3306/test" />
<property name="username" value="root" />
<property name="password" value="root" />
</bean>
- <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
- <property name="dataSource">
<ref bean="dataSource" />
</property>
- <property name="mappingResources">
<value>com/longtop/test/Person.hbm.xml</value>
</property>
- <property name="hibernateProperties">
- <props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
</props>
</property>
</bean>
- <bean id="testDao" class="com.longtop.test.TestDaoImp">
- <property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
</beans>
web.xml:
<?xml version="1.0" encoding="UTF-8" ?>
- <web-app id="WebApp_ID" version="2.4" 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">
<display-name>test</display-name>
- <servlet>
<servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
- <init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/application-*.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
- <servlet-mapping>
<servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
<url-pattern>/messagebroker/*</url-pattern>
</servlet-mapping>
- <welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
- <!--
-->
</web-app>
源码地址:
http://download.csdn.net/source/3398473
http://download.csdn.net/source/3398594
flex4
sdk4
spring3
hibernate3
eclipse3.4
jdk1.6
tomcat6以上(必须是安装版)
spring配置文件:
<?xml version="1.0" encoding="UTF-8" ?>
- <beans xmlns="http://www.springframework.org/schema/beans" xmlns:flex="http://www.springframework.org/schema/flex" 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-3.0.xsd http://www.springframework.org/schema/flex http://www.springframework.org/schema/flex/spring-flex-1.0.xsd">
<flex:message-broker />
- <bean id="testService" class="com.longtop.test.TestService">
<flex:remoting-destination />
<property name="testDao" ref="testDao" />
</bean>
- <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost:3306/test" />
<property name="username" value="root" />
<property name="password" value="root" />
</bean>
- <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
- <property name="dataSource">
<ref bean="dataSource" />
</property>
- <property name="mappingResources">
<value>com/longtop/test/Person.hbm.xml</value>
</property>
- <property name="hibernateProperties">
- <props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
</props>
</property>
</bean>
- <bean id="testDao" class="com.longtop.test.TestDaoImp">
- <property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
</beans>
web.xml:
<?xml version="1.0" encoding="UTF-8" ?>
- <web-app id="WebApp_ID" version="2.4" 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">
<display-name>test</display-name>
- <servlet>
<servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
- <init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/application-*.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
- <servlet-mapping>
<servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
<url-pattern>/messagebroker/*</url-pattern>
</servlet-mapping>
- <welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
- <!--
for WebSphere deployment, please uncomment
-->
</web-app>
源码地址:
http://download.csdn.net/source/3398473
http://download.csdn.net/source/3398594
相关文章推荐
- Flex4+Spring3+Hibernate3+BlazeDS整合笔记
- Flex4+Spring3+Hibernate3+BlazeDS整合笔记
- Spring3开发实战 之 第七章:Struts2+Spring3+Hibernate3整合
- Flex4+Spring3+Hibernate3+BlazeDS整合笔记
- Flex4+Spring3+Hibernate3+BlazeDS整合笔记
- 使用Maven搭建Struts2+Spring3+Hibernate4的整合开发环境
- Struts2+Hibernate3+Spring3 整合
- 使用Maven搭建Struts2+Spring3+Hibernate4的整合开发环境
- eclipse安装flash builder 4.7插件以及java、flex整合开发
- 使用Maven搭建Struts2+Spring3+Hibernate4的整合开发环境
- 【Adobe Air程序开发】eclipse安装flash builder 4.7插件以及java、flex整合开发
- Struts2+Spring3+Hibernate3 SSH框架整合实现CRUD
- 使用Maven搭建Struts2+Spring3+Hibernate4的整合开发环境
- 关于Flex+json+Java的整合开发
- struts2+hibernate3+spring3项目快速开发(图文)之3:搭建项目结构(分包、类实现、方法编写)
- 定时任务服务开发笔记(1)——Quartz2+Spring3+Struts2整合
- SSH项目整合教学Eclipse搭建SSH(Struts2+Spring3+Hibernate3)
- 使用Maven搭建Struts2+Spring3+Hibernate4的整合开发环境
- 总结一下整合Struts2+Hibernate3+Spring4开发Java Web应用过程
- 使用Maven搭建Struts2+Spring3+Hibernate4的整合开发环境