• spring boot + thymeleaf 乱码问题


    spring boot + thymeleaf 乱码问题

                <div class="extra ui horizontal list meta-wrap">
                    <div class="item">
                        <a href="https://my.oschina.net/u/2350780" class="__user"><span>hellotrms</span></a>
                        发布于 2017/01/17 15:27</div>
                    <div class="item">阅读 1K+</div>
                    <div class="item collect-btn " data-id="2217792" data-user-id="2350780" data-obj-type="2" data-max="99" data-tag-required="" data-current-user-id="" data-recommend-tags="">收藏 <span data-collect-count="" data-id="2217792" data-obj-type="2">0</span></div>
                    <div class="item comment-count"><a href="#comments" class="normal"><i class="comment outline icon"></i> 答案 <span data-article-reply-count="">1</span></a></div>
                                                                                                </div>
    
                                
                                <div class="content" id="articleContent">
                    <div class="ad-wrap">
                                                <a data-traceid="question_detail_above_text_l<a data-traceid=" question_detail_above_text_link_1"="" data-tracepid="question_detail_above_text_link" style="color:#A00;font-weight:bold; " href="https://www.oschina.net/question/2663968_2304821" target="_blank"><strong style="font-size: 16px">开发四年只会写业务代码,分布式高并发都不会还做程序员?-&gt;&gt;&gt;
    

      



    spring boot + thymeleaf ,现在一个简单的html页面都有乱码问题,(不是所有中文都是乱码,而是部分乱码)

    配置如下:

    spring:
      thymeleaf:
        prefix: classpath:/templates/
        suffix: .html
        mode: HTML5
        encoding: UTF-8
        content-type: text/html
        cache: false

    以上配置应该是没问题的,还是会出现部分乱码情况

                                <div class="poll-wrap">
                                    </div>
    
                                <div class="additional-remarks">
                    
    
                </div>
    
                                <div class="ui basic center aligned segment action">
                    <div class="ui big buttons">
                        <a class="ui basic button collect-btn hover" data-id="2217792" data-user-id="2350780" data-obj-type="2" data-max="99" data-tag-required="" data-current-user-id="" data-recommend-tags=""><i class="star outline icon"></i>收藏 (<span data-collect-count="" data-id="2217792" data-obj-type="2">0</span>)</a>
                        <div class="ui basic dropdown share button bdsharebuttonbox reset dropdown-share bdshare-button-style0-16" data-tag="share-blog" tabindex="0" data-bd-bind="1560740582280">
                            <i class="share icon"></i> <span>分享</span>
                            <div class="menu" tabindex="-1">
                                <a class="item" data-cmd="tsina"><i class="weibo icon"></i>微博</a>
                                <a class="item" data-cmd="sqq"><i class="qq icon"></i>QQ</a>
                                <a class="item" data-cmd="weixin"><i class="weixin icon"></i>微信</a>
                            </div>
                        </div>
                    </div>
                    <div class="ui basic segment">
                        <a class="ban" style="cursor: pointer" ban-report="" data-id="2217792" data-obj-type="2" data-url="https://www.oschina.net/question/2350780_2217792">
                            <i class="flag red icon"></i>举报</a>
                    </div>
                </div>
    

    原文地址:https://www.oschina.net/question/2350780_2217792

  • 相关阅读:
    [NOI2014]动物园
    2018.7.15模拟赛
    2018.7.13模拟赛
    [CodeForces]920F SUM and REPLACE
    [BZOJ3211]花神游历各国
    [GSS5] Can you answer these queries V
    [SPOJ1716] GSS3
    [HNOI2012]排队
    2018.7.10模拟赛
    7.3模拟赛
  • 原文地址:https://www.cnblogs.com/jpfss/p/11038634.html
  • Copyright © 2020-2023  润新知