SSM框架的搭建

pom,xml 的配置文件:



          4.0.0

          org.lanqiao
          spring-mybatis
          1.0-SNAPSHOT
          
                              
                              
                              
                                        org.mybatis
                                        mybatis
                                        3.4.6
                              
                              
                              
                              
                                        org.slf4j
                                        slf4j-api
                                        1.7.25
                              
                              
                              
                                        log4j
                                        log4j
                                        1.2.17
                              
                              
                              
                              
                                        org.springframework
                                        spring-context
                                        4.3.18.RELEASE
                              
                              
                              
                                        org.springframework
                                        spring-aspects
                                        4.3.18.RELEASE
                              
                              
                              
                                        org.springframework
                                        spring-test
                                        4.3.18.RELEASE
                                        test
                              
                              
                              
                              
                                        org.mybatis
                                        mybatis-spring
                                        1.3.2
                              
                              
                              
                              
                                        junit
                                        junit
                                        4.12
                                        test
                              
                              
                              
                              
                                        mysql
                                        mysql-connector-java
                                        5.1.45
                              
                    
                    
                              org.springframework
                              spring-jdbc
                              4.3.18.RELEASE
                    

          
          
                    
                              
                                        src/main/java
                                        
                                                  **/mapper/*Mapper.xml
                                        
                              
                    
                    
                              
                                        org.apache.maven.plugins
                                        maven-compiler-plugin
                                        
                                                  7
                                                  7
                                        
                              
                    
          

在SSM框架中配置spring-mvc.xml文件 (配置mvc中的视图层)



    
    
    
    
    
    
        
        
        
    
    
    



 web.xml 配置全文的其他配置文件:spring-mybatis.xml,spring-mvc.xml ,spring监听器,编码过滤器,中央调度器



          Archetype Created Web Application

          
          
                    contextConfigLocation
                    classpath:spring-*.xml
          
          
          
                    encodingFilter
                    org.springframework.web.filter.CharacterEncodingFilter
                    true
                    
                              encoding
                              UTF-8
                    
          
          
                    encodingFilter
                    /*
          

          
          
                    org.springframework.web.context.ContextLoaderListener
          

          
          
                    SpringMVC
                    org.springframework.web.servlet.DispatcherServlet
                    
                              contextConfigLocation
                              classpath:spring-mvc.xml
                    
                    1
          
          
                    SpringMVC
                    
                    /
          
          
                    index.jsp
          

spring-mybatis.xml



    
    
    
    
        
        
        
        
    
    
    
        
        
    
    
    
        
        
    
    
    
        
    
    
    
    

mybatis.xml





    
        
        
        
        
        
        
        
        

    
    
    
    
        
    
    
        
    


 

你可能感兴趣的:(SSM框架的搭建)