<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                >多租戶數據隔離:根據不同的租戶實現數據隔離,下面讓我們一起來看看如何實現多租戶數據隔離吧 >[warning]版本支持1.5.2+(不包含1.5.2) ## jeecg-boot ### 后臺配置 >`JimuReportTokenService`類實現新增方法`getTenantId` ![](https://img.kancloud.cn/ac/1d/ac1de1db464c44e76cf8a18b801e8c9f_1616x661.png) ``` /** * 獲取多租戶id * @return tenantId */ public String getTenantId() { HttpServletRequest request = SpringContextUtils.getHttpServletRequest(); String tenantId = request.getHeader("tenantId"); if(StringUtils.isNotEmpty(tenantId)){ return tenantId; } return ""; } ``` ### 前臺配置 >在菜單管理積木報表處新增屬性`tenantId` ![](https://img.kancloud.cn/be/32/be32d7dd81a400cb02afa3e9b1227697_1675x915.png) ``` {{ window._CONFIG['domianURL'] }}/jmreport/list?token=${token}&tenantId=${tenantId} ``` ## springboot項目集成 ### 效果展示 >存在`tenantId` ![](https://img.kancloud.cn/74/8b/748be600c35f3fe0c52647ca781d1942_1563x562.png) >不存在`tenantId` ![](https://img.kancloud.cn/19/23/192367ca9e3f3e02d1b00f9c06a8cb6e_1910x963.png) ### 重點來了->后臺配置 >`JmReportTokenServiceI`接口新增方法`getTenantId`,默認為`""` ![](https://img.kancloud.cn/80/80/80805335f277d9f03d64227521b191ce_631x48.png) > 實現類新增方法getTenantId() ![](https://img.kancloud.cn/89/ff/89ff7a3e120bcffa9cb39fe3fa8282bc_1709x609.png) ``` @Override public String getTenantId() { //獲取tenantId租戶id的邏輯 return "1"; } ``` ### 重點來了->前臺配置 >訪問路徑拼接`tenantId`,如果你想在`header`中獲取數據,那么需要配置此步驟,配置成動態路徑需要根據自己的前臺項目進行動態訪問 ``` http://localhost:9000/jmreport/list?tenantId=值 ``` ![](https://img.kancloud.cn/0f/06/0f06e80d4aab113d4b18cef3b7e4d826_1545x983.png)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看