搭建SSM项目

WEB-INF下的配置
导入jar包
com.springsource.org.aopalliance-1.0.0.jar
com.springsource.org.apache.commons.dbcp-1.2.2.osgi.jar
com.springsource.org.apache.commons.logging-1.1.1.jar
com.springsource.org.apache.commons.pool-1.5.3.jar
jsqlparser-0.9.1.jar
jstl.jar
mybatis-3-config.dtd
mybatis-3-mapper.dtd
mybatis-3.3.0.jar
mybatis-spring-1.2.2.jar
mysql-connector-java-commercial-5.1.25-bin.jar
pagehelper-4.0.3.jar
servlet-api.jar
spring-aop-3.2.9.RELEASE.jar
spring-beans-3.2.9.RELEASE.jar
spring-context-3.2.9.RELEASE.jar
spring-context-support-3.2.9.RELEASE.jar
spring-core-3.2.9.RELEASE.jar
spring-expression-3.2.9.RELEASE.jar
spring-jdbc-3.2.9.RELEASE.jar
spring-orm-3.2.9.RELEASE.jar
spring-struts-3.2.9.RELEASE.jar
spring-tx-3.2.9.RELEASE.jar
spring-web-3.2.9.RELEASE.jar
spring-webmvc-3.2.9.RELEASE.jar
standard.jar

web.xml中的配置



  Teacher
  
    springmvc
    org.springframework.web.servlet.DispatcherServlet
    
      contextConfigLocation
      /WEB-INF/springMVC-config.xml
    
    1
  
  
    springmvc
    /
  
  
    characterEncodingFilter
    
			org.springframework.web.filter.CharacterEncodingFilter
		
    
      encoding
      UTF-8
    
    
      forceEncoding
      true
    
  
  
    characterEncodingFilter
    /*
  


springMVC-config.xml中的配置



     
    
    
    
  
     
    
    
    
    
    
   
 
  
   

mybatisConfig.xml中的配置





	
        
	
	
	
	   
	    
	    
	   
	    
	   
	   
	   
	
	
	    
	    
	        
	        
	                 
	        
	        
	        
	        
	        
	        
	        
	        
	        
	        
	        
	        
	        
	        
	        
	        
	        
	        
	        
	        
	        
	        
	        
	        
	        
	    
	
	

jdbc-config.xml中的配置



     
    
 
   
    
        
      
    
 
 
  
  
   
    
 

   
   
     
     
   
   
   
      
   
   
        
   
   

src下面的dbcp.properties中

driverClassName=com.mysql.jdbc.Driver
url=jdbc:mysql://127.0.0.1:3306/17101db?useUnicode=true&characterEncoding=utf8
username=root
password=root

你可能感兴趣的:(java)