Spring MVC: CharacterEncodingFilter; why only set response encoding by force?

前端 未结 2 1062
时光说笑
时光说笑 2021-02-09 19:46

I was having a look at the CharacterEncodingFilter provided by Spring MVC. I was wondering why it was only possible to set the response encoding when the request encoding was fo

2条回答
  •  没有蜡笔的小新
    2021-02-09 20:02

    If nothing else works, you can create a filter ( bean ) in security-Context.xml and set forceEnconding=true;

    
        
        
    
    

    Don't forget to set the new custom-Filter:

    
    

提交回复
热议问题