在web.xml配置过滤器:

    
        
characterEncodingFilter
        
org.springframework.web.filter.CharacterEncodingFilter
        
            
encoding
            
UTF-8
        
        
            
forceEncoding
            
true
        
    
    
        
characterEncodingFilter
        
/*