How to set content-type in Freemarker views when using Spring MVC?

后端 未结 2 501
你的背包
你的背包 2020-12-19 09:24

I\'m using Sping MVC with freemarker views. I set up a FreeMarkerViewResolver to resolve the views and it works so far but now I have encoding problems. All my views are HTM

2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-19 09:32

    The view resolver (should be in your dispatcher-servlet.xml) has a contentType property for that:

    
        
        
        
    
    

提交回复
热议问题