ssm搭建必备

1 SqlMapConfig.xml

空文件即可






2 SSM整合

2.1 applicationContext-dao.xml




	
	

	
	
		
		
		
		
	

	
	
		
		
		
		
	

	
	
		
		
	

2.2 jdbc.properties

配置数据库信息

jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/crm?characterEncoding=utf-8
jdbc.username=root
jdbc.password=root

 

2.3 log4j.properties

配置日志信息

# Global logging configuration
log4j.rootLogger=DEBUG, stdout
# Console output...
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n

2.4 applicationContext-service.xml




	
	

2.5 applicationContext-trans.xml

配置事务管理:事务管理器、通知、切面



	
	
		
		
	
	
	
		
			
			
			
			
			
			
			
			
			
			
			
		
	
	
	
		
	

2.6 Springmvc.xml



	
	

	
	

	
	
		
		
		
		
	

2.7 web.xml



	boot-crm
	
		index.jsp
	

	
	
		contextConfigLocation
		classpath:spring/applicationContext-*.xml
	

	
	
		org.springframework.web.context.ContextLoaderListener
	

	
	
		encoding	
        org.springframework.web.filter.CharacterEncodingFilter
	
	
		encoding
		/*
	

	
	
		boot-crm
		org.springframework.web.servlet.DispatcherServlet
		
			contextConfigLocation
			classpath:spring/springmvc.xml
		
		
		
		
		1
	
	
		boot-crm
		/
	

3 Mapper.xml






ssm搭建

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

你可能感兴趣的:(worker,study)