锘??xml version="1.0" encoding="utf-8" standalone="yes"?>91久久久久久久久久久,成人免费va视频,国产区在线视频http://www.aygfsteel.com/illu/category/41060.html紓ㄧ粌鍦ㄧ敓媧葷殑璋峰簳zh-cnTue, 28 Jul 2009 02:59:07 GMTTue, 28 Jul 2009 02:59:07 GMT60struts2.0 spring2.5 hibernate3.3鏁村悎http://www.aygfsteel.com/illu/articles/struts_spring_hibernate.html搴旇秺搴旇秺Mon, 27 Jul 2009 06:49:00 GMThttp://www.aygfsteel.com/illu/articles/struts_spring_hibernate.htmlhttp://www.aygfsteel.com/illu/comments/288578.htmlhttp://www.aygfsteel.com/illu/articles/struts_spring_hibernate.html#Feedback0http://www.aygfsteel.com/illu/comments/commentRss/288578.htmlhttp://www.aygfsteel.com/illu/services/trackbacks/288578.html         棣栧厛涓嬭澆3涓鏋?br />         struts2.0           涓嬭澆鍦板潃    http://apache.freelamp.com/struts/binaries/struts-2.0.14-all.zip
        spring2.5          涓嬭澆鍦板潃    http://s3.amazonaws.com/dist.springframework.org/release/SPR/spring-framework-2.5.6.SEC01-with-dependencies.zip     
        hibernate3.3     涓嬭澆鍦板潃    http://downloads.sourceforge.net/project/hibernate/hibernate3/3.3.2.GA/hibernate-distribution-3.3.2.GA-dist.zip

        struts/lib涓?鎵懼嚭浠ヤ笅5涓猨ar鏂囦歡 瀹冧滑鏄嬌鐢╯truts2蹇呴』鐨刯ar鏂囦歡
            commons-logging-1.0.4.jar
            freemarker-2.3.8.jar
            ognl-2.6.11.jar
            struts2-core-2.0.11.1.jar
            xwork-2.0.4.jar
            鍐嶆壘鍑?nbsp; struts2-spring-plugin-2.0.14.jar   瀹冩槸struts2涓巗pring鏁村悎蹇呴』鐨刯ar鏂囦歡

        spring/dist涓?nbsp;
            spring.jar
        spring/lib/aspectj涓?nbsp; 鍦╯pring涓嬌鐢╝spectj 蹇呴』鐨刯ar鍖?br />             aspectjrt.jar
            aspectjweaver.jar
        spring/lib/log4j
            log4j-1.2.15.jar

        hibernate/hibernate3.jar
        hibernate/lib/required 涓?鎵鏈塲ar鏂囦歡 瀹冧滑鏄嬌鐢╤ibernate蹇呴』鐨刯ar鏂囦歡
        娉ㄦ剰鍏朵腑鏈塻lf4j-api-1.5.8.jar 鏂囦歡 瀹冨彧鏄竴涓鑼?br />         鎴戜滑闇瑕佷笅杞藉畠瀵筶og4j瀹炵幇鐨刯ar鏂囦歡
        涓嬭澆鍦板潃 http://www.slf4j.org/dist/slf4j-1.5.2.zip
        鎵懼嚭鍏朵腑鏈変竴涓猻lf4j-log4j12-1.5.2.jar 

        浠ヤ笂涓鍏?8涓猨ar鏂囦歡
        
  浜屻佷慨鏀歸厤緗枃浠?br />         web.xml
        
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi
="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation
="http://java.sun.com/xml/ns/javaee 
    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
>
    
<context-param>
        
<param-name>contextConfigLocation</param-name>
        
<param-value>classpath*:applicationContext-*.xml</param-value>
    
</context-param>

    
<filter>
        
<filter-name>struts2</filter-name>
        
<filter-class>
            org.apache.struts2.dispatcher.FilterDispatcher
        
</filter-class>
    
</filter>
    
<filter-mapping>
        
<filter-name>struts2</filter-name>
        
<url-pattern>/*</url-pattern>
    
</filter-mapping>
    
    
<filter>
        
<filter-name>hibernateFilter</filter-name>
        
<filter-class>
            org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
        
</filter-class>
    
</filter>
    
<filter-mapping>
        
<filter-name>hibernateFilter</filter-name>
        
<url-pattern>*.action</url-pattern>
    
</filter-mapping>
    
    
    
<filter>   
    
<filter-name>Spring character encoding filter</filter-name>   
    
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>   
        
<init-param>   
            
<param-name>encoding</param-name>   
            
<param-value>GBK</param-value>   
        
</init-param>   
    
</filter>   
    
<filter-mapping>   
        
<filter-name>Spring character encoding filter</filter-name>   
        
<url-pattern>/*</url-pattern>   
    
</filter-mapping>
    
    
<listener>
        
<listener-class>
            org.springframework.web.context.ContextLoaderListener
        
</listener-class>
    
</listener>

    
<welcome-file-list>
        
<welcome-file>index.jsp</welcome-file>
    
</welcome-file-list>
</web-app>

hibernate.cfg.xml
<?xml version="1.0"?>
<!DOCTYPE hibernate-configuration PUBLIC
    "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"
>

<hibernate-configuration>
    
<session-factory>
        
<property name="format_sql">false</property>
        
<property name="show_sql">true</property>
        
<property name="connection.driver_class">
            org.gjt.mm.mysql.Driver
        
</property>
        
<property name="connection.url">
            jdbc:mysql://localhost:3306/s2sh
        
</property>
        
<property name="connection.username">root</property>
        
<property name="connection.password">password</property>
        
<property name="dialect">
            org.hibernate.dialect.MySQLDialect
        
</property>
        
<property name="hbm2ddl.auto">none</property>
        
<mapping resource="com/illu/pojo/User.hbm.xml" />
    
</session-factory>
</hibernate-configuration>

applicationContext.xml
<?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"
    xmlns:lang
="http://www.springframework.org/schema/lang"
    xsi:schemaLocation
="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
        http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.0.xsd 
        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd"
>
    
    
<bean id="sessionFactory"
        class
="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
        
<property name="configLocation">
            
<value>classpath:hibernate.cfg.xml</value>
        
</property>
    
</bean>
    
    
<bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
        
<property name="sessionFactory">
            
<ref bean="sessionFactory"/>
        
</property>
    
</bean>
    
    
<!-- 閰嶇疆浜嬪姟綆$悊鍣?nbsp;-->

    
<bean id="transactionManager"
        class
="org.springframework.orm.hibernate3.HibernateTransactionManager">
        
<property name="sessionFactory">
            
<ref bean="sessionFactory" />
        
</property>
    
</bean>

    
<!-- 閰嶇疆浜嬬墿浼犳挱鐗規?nbsp;-->
    
<tx:advice id="txAdvice" transaction-manager="transactionManager">
        
<tx:attributes>
            
<tx:method name="add*" propagation="REQUIRED" />
            
<tx:method name="delete*" propagation="REQUIRED" />
            
<tx:method name="modify*" propagation="REQUIRED" />
            
<tx:method name="*" read-only="true" />
        
</tx:attributes>
    
</tx:advice>

    
<!-- 鍝簺綾葷殑鍝簺鏂規硶鍙備笌浜嬬墿, (* com.evan.crm.service.*.*(..))涓嚑涓氶厤絎︾殑鍚箟錛?br />         絎竴涓?nbsp;* 鈥斺?nbsp;閫氶厤 浠繪剰榪斿洖鍊肩被鍨?br />         絎簩涓?nbsp;* 鈥斺?nbsp;閫氶厤 鍖卌om.evan.crm.service涓嬬殑浠繪剰class
        絎笁涓?nbsp;* 鈥斺?nbsp;閫氶厤 鍖卌om.evan.crm.service涓嬬殑浠繪剰class鐨勪換鎰忔柟娉?br />         絎洓涓?nbsp;.. 鈥斺?nbsp;閫氶厤 鏂規硶鍙互鏈?涓垨澶氫釜鍙傛暟
        緇間笂錛氬寘com.evan.crm.service涓嬬殑浠繪剰class鐨勫叿鏈変換鎰忚繑鍥炲肩被鍨嬨佷換鎰忔暟鐩弬鏁板拰浠繪剰鍚嶇О鐨勬柟娉?/span>-->
    
<aop:config>
        
<aop:pointcut id="allManagerMethod"
            expression
="execution(* com.struts2.service.*.*(..))" />
        
<aop:advisor pointcut-ref="allManagerMethod"
            advice-ref
="txAdvice" />
    
</aop:config>
</beans>




搴旇秺 2009-07-27 14:49 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 雅安市| 上思县| 邛崃市| 白银市| 虹口区| 綦江县| 肇东市| 和政县| 鄂托克旗| 开封市| 尼勒克县| 黑山县| 延吉市| 襄樊市| 潍坊市| 三门峡市| 修文县| 乌兰察布市| 嘉黎县| 连南| 克什克腾旗| 调兵山市| 肥西县| 涪陵区| 钦州市| 祁阳县| 克什克腾旗| 房山区| 康定县| 大邑县| 乌兰浩特市| 额敏县| 汉中市| 义乌市| 息烽县| 迭部县| 体育| 沁源县| 宁乡县| 宜良县| 夏河县|