spring mvc配置及整合hibernate

1、web.xml文件配置分发器

    
    nav
    org.springframework.web.servlet.DispatcherServlet
    1
    
    
    nav
    *.do
    

2、servlet.xml文件


	
		
			
				informationController
			
		
	
	  
          
            action  
          
        
            index  
          
    
    
		
	
	
	
		
			org.springframework.web.servlet.view.JstlView
		
		
			/WEB-INF/jsp/apps/nav/
		
		
			.jsp
		
	


要添加beans属性 default-autowire="byName" default-lazy-init="true"
 
		
		
		
		
		
		
		
		
		
		
		
	
	
		
			
				
					classpath:/com/talelife/nav/domain/maps/
				
			
		
		
			
				
					org.hibernate.dialect.MySQLInnoDBDialect
				
				
				update
				true
				30
				30
				true
				true
				
					org.hibernate.cache.EhCacheProvider
				
			
		
	


	
		
	
	



你可能感兴趣的:(J2EE开发,hibernate,spring,mvc,bean,servlet,database)