程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> C語言 >> C++ >> C++入門知識 >> springmvc+mybatis整合

springmvc+mybatis整合

編輯:C++入門知識

springmvc+mybatis整合


web.xml



	Archetype Created Web Application
	
		contextConfigLocation
		
			classpath*:applicationContext-mybatis.xml
		
	
	   
	  
		log4jConfigLocation  
		classpath:log4j.properties  
	  
      
	  
		log4jRefreshInterval  
		60000  
	  
   
	
	  
		CharacterEncodingFilter  
		org.springframework.web.filter.CharacterEncodingFilter  
		  
			encoding  
			utf-8  
		  
	  
	  
		CharacterEncodingFilter  
		/*  
	
	 
	
		org.springframework.web.context.ContextLoaderListener
	
	  
		  
            org.springframework.web.util.Log4jConfigListener  
		  
	  
	  
		SpringMVC  
		org.springframework.web.servlet.DispatcherServlet  
		
			contextConfigLocation
			classpath*:spring-servlet.xml
		
		1  
	  
  
	  
		SpringMVC  
		/  
	
	
	 
		default 
		*.css 
	 
  
	 
		default 
		*.gif 
	 
  
	 
		default 
		*.jpg 
	 
  
	 
		default 
		*.js 
	
	
		index.jsp
	



applicationContext-mybatis.xml


	aspectj-autoproxy proxy-target-class="true">
	
	
	
	
			
			classpath:jdbc.properties
		
	
	
	 
		
			${jdbc.oracle.driverClassName}
		 
		
			${jdbc.oracle.url}
		 
		
			${jdbc.oracle.username} 
		 
		 
			${jdbc.oracle.password}
		
	
	
	
	
		
		
	
	
	
		
		
	
	
	
		
	
	
	
	
	
	
		
			
		
		
			
				PROPAGATION_REQUIRED
			
		
	
	
	
		
			
				*Service
			
		
		
			
				transactionInterceptor
			
		
	


spring-servlet.xml(springmvc配置文件)

 

 

  

	
	  
	  
  
	  
	  
	  
	  
		  
		  
		  
	  
	  
	    
	  
	  
 
mybatis.xml配置文件



	

pom.xml

 


	4.0.0
	com.lin.project
	mybatis
	war
	0.0.1-SNAPSHOT
	mybatis Maven Webapp
	http://maven.apache.org
	
		
			junit
			junit
			3.8.1
			test
		
		
			commons-logging
			commons-logging
			1.2
		
		
			log4j
			log4j
			1.2.17
		
		
			commons-dbcp
			commons-dbcp
			1.4
		
		
			org.mybatis
			mybatis
			3.2.7
		
		
			org.mybatis
			mybatis-spring
			1.2.2
		
		
			org.springframework
			spring-core
			4.0.6.RELEASE
		
		
			org.springframework
			spring-beans
			4.0.6.RELEASE
		
		
			org.springframework
			spring-tx
			4.0.6.RELEASE
		
		
			org.springframework
			spring-aop
			4.0.6.RELEASE
		
		
			org.springframework
			spring-jdbc
			4.0.6.RELEASE
		
		
			org.springframework
			spring-webmvc
			4.0.6.RELEASE
		
		
			org.springframework
			spring-web
			4.0.6.RELEASE
		
		
			org.springframework
			spring-context-support
			4.0.6.RELEASE
		
		
			org.springframework
			spring-orm
			4.0.6.RELEASE
		
		
			org.springframework
			spring-test
			4.0.6.RELEASE
		
		
			org.aspectj
			aspectjweaver
			1.8.2
		
		
			jstl
			jstl
			1.2
		
		
			taglibs
			standard
			1.1.2
		

		
			mysql
			mysql-connector-java
			5.1.32
		

	
	
		mybatis
	



 

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved