ssmbiuld整合-spring




spring-mapper.xml:

<?xml version="1.0" encoding="UTF-8"?>


    
    

    
    
    
        
        
        
        

        
        
    

    
    
        
        
        
    


    
    
        
        
    



此处,连接池用的是c3p0,数据库的配置有所不同,需要把database.properties配置文件改成jdbc.属性

jdbc.driver=com.mysql.cj.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/mybatistest?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT
jdbc.username=root
jdbc.password=123456

spring-service.xml:

<?xml version="1.0" encoding="UTF-8"?>



    
    

    
    
        
    

    
    
        
        
    



将两个配置文件整合到applicationContext.xml中:


<?xml version="1.0" encoding="UTF-8"?>


    
    


注意:File->Project Structure->Facets,查看保证这几个配置文件在一个目录下