spring配置大小写不敏感

util类:

import org.springframework.util.AntPathMatcher;
import java.util.Map;
public class CaseInsenseticePathMatcher extends AntPathMatcher {    
                    @Override    protected boolean doMatch(String pattern, String path, boolean fullMatch, Map uriTemplateVariables) {      
                        System.err.println(pattern + " -- " + path);      
                         return super.doMatch(pattern.toLowerCase(), path.toLowerCase(), fullMatch, uriTemplateVariables);  
                        }
}

application.xml配置:



    

                
                            
                                                

springmvc.xml配置:


    
               
                           
                                                  

你可能感兴趣的:(spring配置大小写不敏感)