處理html視圖解析器,html亂碼
發(fā)表時(shí)間:2023-09-12 來(lái)源:明輝站整理相關(guān)軟件相關(guān)文章人氣:
[摘要]這篇文章介紹的內(nèi)容是解決html視圖解析器,html亂碼,有著一定的參考價(jià)值,現(xiàn)在分享給大家,有需要的朋友可以參考一下項(xiàng)目編碼,html頁(yè)面編碼瀏覽器解析編碼都應(yīng)該一致html頁(yè)面可以添加:<meta http-equiv="Content-Type" content=&...
這篇文章介紹的內(nèi)容是解決html視圖解析器,html亂碼,有著一定的參考價(jià)值,現(xiàn)在分享給大家,有需要的朋友可以參考一下
項(xiàng)目編碼,html頁(yè)面編碼瀏覽器解析編碼都應(yīng)該一致
html頁(yè)面可以添加:<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
html視圖解析器:
<bean id="viewResolver"
class="org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver">
<property name="exposeRequestAttributes" value="true" />
<property name="exposeSessionAttributes" value="true" />
<property name="viewClass">
<value>org.springframework.web.servlet.view.freemarker.FreeMarkerView </value>
</property>
<property name="cache">
<value>true</value>
</property>
<property name="suffix">
<value>.html</value>
</property>
<property name="contentType">
<value>text/html; charset=UTF-8</value>
</property>
</bean>
<bean id="freemarkerConfig"
class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">
<property name="templateLoaderPath">
<value>/WEB-INF/views/</value>
</property>
<property name="freemarkerSettings">
<props>
<prop key="locale">zh_CN</prop>
<prop key="defaultEncoding">UTF-8</prop>
<!-- <prop key="date_format">yyyy-MM-dd</prop> -->
<!-- <prop key="time_format">HH:mm:ss</prop> -->
<!-- <prop key="datetime_format">yyyy-MM-dd HH:mm:ss</prop> -->
<!-- <prop key="number_format">0.################</prop> -->
</props>
</property>
</bean>
相關(guān)推薦:
動(dòng)態(tài)生成HTML元素并為元素追加屬性
以上就是解決html視圖解析器,html亂碼的詳細(xì)內(nèi)容,更多請(qǐng)關(guān)注php中文網(wǎng)其它相關(guān)文章!
網(wǎng)站建設(shè)是一個(gè)廣義的術(shù)語(yǔ),涵蓋了許多不同的技能和學(xué)科中所使用的生產(chǎn)和維護(hù)的網(wǎng)站。