Struts2+spring3+mybatis3整合

目录结构

--------------------------------------------------------------------------------------------------------------------------------------------------

Struts2+spring3+mybatis3整合_第1张图片

--------------------------------------------------------------------------------------------------------------------------------------------------

使用的jar包

--------------------------------------------------------------------------------------------------------------------------------------------------

1、com.springsource.org.apache.commons.dbcp-1.2.2.osgi.jar

2、com.springsource.org.apache.commons.logging-1.1.1.jar

3、com.springsource.org.apache.commons.pool-1.5.3.jar

4、commons-fileupload-1.2.2.jar

5、commons-io-2.0.1.jar

6、commons-lang3-3.1.jar

7、freemarker-2.3.19.jar

8、javassist-3.11.0.GA.jar

9、msbase.jar

10、mssqlserver.jar

11、msutil.jar

12、mybatis-3.0.4.jar

13、mybatis-spring-1.0.0.jar

14、ognl-3.0.5.jar

15、org.springframework.asm-3.0.2.RELEASE.jar

16、org.springframework.beans-3.0.2.RELEASE.jar

17、org.springframework.context-3.0.2.RELEASE.jar

18、org.springframework.core-3.0.2.RELEASE.jar

19、org.springframework.expression-3.0.2.RELEASE.jar

20、org.springframework.jdbc-3.0.2.RELEASE.jar

21、org.springframework.transaction-3.0.2.RELEASE.jar

22、org.springframework.web-3.0.2.RELEASE.jar

23、struts2-core-2.3.4.jar

24、struts2-spring-plugin-2.3.4.jar

25、xwork-core-2.3.4.jar

--------------------------------------------------------------------------------------------------------------------------------------------------

web配置文件

--------------------------------------------------------------------------------------------------------------------------------------------------


    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">

    
    
        org.springframework.web.context.ContextLoaderListener
   

     
       contextConfigLocation  
       classpath:applicationContext/applicationContext.xml  
   

   

    
    
        struts2
       
             org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
       

       
            actionPackages
            com.logo.group.webapp.action
        

   

   
         struts2
         /*
   

    
    
    
        index.jsp
    




--------------------------------------------------------------------------------------------------------------------------------------------------

struts配置文件

--------------------------------------------------------------------------------------------------------------------------------------------------


    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">


   
     
       
       

    
       
       
            /index.html
       


       
           
       

   

    
   

        
            /userRes.jsp
        


    

    

--------------------------------------------------------------------------------------------------------------------------------------------------

spring 配置文件

--------------------------------------------------------------------------------------------------------------------------------------------------


    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:p="http://www.springframework.org/schema/p"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context-3.0.xsd
        ">

   
    
        
        

        
        

        
        
    


   
    
        
    

    
    
    
        
    


    
             class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
        
    

    
    
    

--------------------------------------------------------------------------------------------------------------------------------------------------


你可能感兴趣的:(struts2,spring3,mybatis3)