SSM框架

Spring+SpringMvc+Mybatis框架

1.maven依赖

spring-core     spring-web      spring-jdbc
spring-webmvc     spring-context-support
Mybatis     mybatis-spring    mysql-connector-java
jackson-databind    jackson-core     jackson-annotations

2.web.xml




    Archetype Created Web Application

    
    
        contextConfigLocation
        classpath:spring-mybatis.xml
    


    
    
        org.springframework.web.context.ContextLoaderListener
    

    
          
            springMvc
            org.springframework.web.servlet.DispatcherServlet
            
              contextConfigLocation
              classpath:spring-mvc.xml
            
          
          
          
            springMvc
            /
          


3.spring和mybatis整合的xml   spring-mybatis.xml





    
    
    

    
    
        
    

    
            
            
            
            
    

         

        
        
            
            
            
    

    
    
        
    

4.spring-mvc     spring-mvc.xml



    
    
    
    
    
    
    

    
    
        
        
    

5.database.properties

driverClassName=com.mysql.cj.jdbc.Driver
url=jdbc:mysql://localhost/book?serverTimezone=GMT&useSSL=false
username=root
password=123456

6.项目目录

SSM框架_第1张图片

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