基于Spring,Struts2,mybatis的增删改查

1.在maven下,至于需要的架包,地址入右;http://blog.csdn.net/m0_37942145/article/details/63253566

2.web.xml中的相关配置,struts2负责前端请求拦截,Spring负责bean的实例,mybatis负责数据库的操作

具体的数据库操作在applicationContext.xml中


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


    struts2
    /*

  


 
  org.springframework.web.context.ContextLoaderListener
 

 
  contextConfigLocation
classpath:applicationContext.xml
 

3.以下是具体的applicationContext.xml的相关配置

 

 //关于SpringAop切面的

  
       
         //关于jdbc.properties没写很简单
         
         
         
           
           
           
         

        
       
 
     
       
       
       
       
       
       
       

       



4.struts.xml的相关配置,就不多说,很简单;

5.至于具体的分层是典型的mvc架构,就不多说,bean,service,dao,web,典型的分层

6,至于完整的源码如有边所示点击打开链接

你可能感兴趣的:(java)