<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>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## Jpa內置查詢 jpa內置多種動態查詢,常用的有:Example實例查詢、Specification復雜查詢。 使用文章推薦:https://blog.csdn.net/qq_30054997/article/details/79420141 ## QuerySpec查詢 QuerySpec是基于Specification復雜查詢封裝的一套查詢工具,語法類似于Example實例查詢,dao層需要繼承JpaSpecificationExecutor\<T>接口。示例如下: ```java public Page<User> getPageList(User user, Integer pageIndex, Integer pageSize) { // 創建分頁對象 Sort sort = new Sort(Sort.Direction.ASC, "createDate"); PageRequest page = PageRequest.of(pageIndex-1, pageSize, sort); QuerySpec querySpec = QuerySpec.matching() .withMatcher("nickname", QuerySpec.LIKE) .withIgnorePaths("password"); return userRepository.findAll(QuerySpec.of(user, querySpec), page); } ``` 1. static matching() --------------------------------------------------創建QuerySpec實例 2. withMatcher("字段名", 查詢規則) -----------------------------添加查詢匹配器 3. withMatcherIn("字段名", 值列表) ------------------------------添加In查詢方式匹配器 4. withMatcherBetween("字段名", 值1, 值2) -------------------添加Between查詢方式匹配器 5. withIgnorePaths("忽略字段"...) ---------------------------------設置需要忽略查詢的字段 6. static of(實體對象 ,QuerySpec實例) --------------------------獲取Specification復雜查詢實例 **注意**:QuerySpec查詢不支持關聯的字段,必須忽略關聯的字段!
                  <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>

                              哎呀哎呀视频在线观看