SSM框架基础配置

SSM框架基础配置

jdbc.properties:

jdbc.url = jdbc\:mysql\:///mybatis01
jdbc.driver = com.mysql.jdbc.Driver
jdbc.username= root
jdbc.password= 123456

log4j.properties:

### direct log messages to stdout ###
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n

### direct messages to file mylog.log ###
log4j.appender.file=org.apache.log4j.FileAppender
log4j.appender.file.File=c:/mylog.log
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n

### set log levels - for more verbose logging change 'info' to 'debug' ###

log4j.rootLogger=info, stdout

applicationContext.xml:



        
    
    
        
      
    
    
    
        
        
        
        
    
    
    
    
    
    
    
    
        
     
     
     
     
     
     
      
     
    
    
    
    
    
    
    
    
    
    
       
        
    
    
    
    
    
    
    

springmvc.xml:



        
    
    
    
    
    
    
        
        
    
    
    
    
        
    
    

mybatis.xml:






web.xml:



  SSMConfig
  
  
  
    characterEncodingFilter
    org.springframework.web.filter.CharacterEncodingFilter
      
      
        encoding
        utf-8
      
      
      
        forceEncoding
        true
       
  
 
    characterEncodingFilter
    /*
 
 
 
 
 
 
  org.springframework.web.context.ContextLoaderListener
  
  
  contextConfigLocation
  classpath:beans.xml
  
    

所需jar包:

SSM框架基础配置_第1张图片
jar.PNG

你可能感兴趣的:(SSM框架基础配置)