最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

springboot整合阿里云百煉DeepSeek實(shí)現(xiàn)sse流式打印的操作方法

 更新時(shí)間:2025年04月18日 10:56:26   作者:該用戶(hù)已被封禁無(wú)法顯示  
這篇文章主要介紹了springboot整合阿里云百煉DeepSeek實(shí)現(xiàn)sse流式打印,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下

1.開(kāi)通阿里云百煉,獲取到key

官方文檔地址
https://bailian.console.aliyun.com/?tab=api#/api/?type=model&url=https%3A%2F%2Fhelp.aliyun.com%2Fdocument_detail%2F2868565.html

2.新建SpringBoot項(xiàng)目

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>devicewx-ai</groupId>
    <artifactId>devicewx-ai</artifactId>
    <version>1.0-SNAPSHOT</version>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.5.15</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <!--阿里云deepseek-->
        <!-- https://mvnrepository.com/artifact/com.alibaba/dashscope-sdk-java -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>dashscope-sdk-java</artifactId>
            <version>2.18.3</version>
        </dependency>
        <!-- 集成redis依賴(lài)  -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.16</version>
        </dependency>
    </dependencies>
</project>

3.工具類(lèi)

import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
/**
 * redis工具類(lèi)
 * @Author: albc
 * @Date: 2024/07/17/15:31
 * @Description: good good study,day day up
 */
@Component
public class RedisUtil {
    @Resource
    private RedisTemplate<String, Object> redisTemplate;
    // =============================common============================
    /**
     * 指定緩存失效時(shí)間
     *
     * @param key  鍵
     * @param time 時(shí)間(秒)
     */
    public boolean expire(String key, long time) {
        try {
            if (time > 0) {
                redisTemplate.expire(key, time, TimeUnit.SECONDS);
            }
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }
    /**
     * 根據(jù)key 獲取過(guò)期時(shí)間
     *
     * @param key 鍵 不能為null
     * @return 時(shí)間(秒) 返回0代表為永久有效
     */
    public long getExpire(String key) {
        return redisTemplate.getExpire(key, TimeUnit.SECONDS);
    }
    /**
     * 判斷key是否存在
     *
     * @param key 鍵
     * @return true 存在 false不存在
     */
    public boolean hasKey(String key) {
        try {
            return redisTemplate.hasKey(key);
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }
    /**
     * 刪除緩存
     *
     * @param key 可以傳一個(gè)值 或多個(gè)
     */
    @SuppressWarnings("unchecked")
    public void del(String... key) {
        if (key != null && key.length > 0) {
            if (key.length == 1) {
                redisTemplate.delete(key[0]);
            } else {
                //redisTemplate.delete(CollectionUtils.arrayToList(key));
            }
        }
    }
    // ============================String=============================
    /**
     * 普通緩存獲取
     *
     * @param key 鍵
     * @return 值
     */
    public Object get(String key) {
        return key == null ? null : redisTemplate.opsForValue().get(key);
    }
    /**
     * 普通緩存放入
     *
     * @param key   鍵
     * @param value 值
     * @return true成功 false失敗
     */
    public boolean set(String key, Object value) {
        try {
            redisTemplate.opsForValue().set(key, value);
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }
    /**
     * 普通緩存放入并設(shè)置時(shí)間
     *
     * @param key   鍵
     * @param value 值
     * @param time  時(shí)間(秒) time要大于0 如果time小于等于0 將設(shè)置無(wú)限期
     * @return true成功 false 失敗
     */
    public boolean set(String key, Object value, long time) {
        try {
            if (time > 0) {
                redisTemplate.opsForValue().set(key, value, time, TimeUnit.SECONDS);
            } else {
                set(key, value);
            }
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }
    /**
     * 遞增
     *
     * @param key   鍵
     * @param delta 要增加幾(大于0)
     */
    public long incr(String key, long delta) {
        if (delta < 0) {
            throw new RuntimeException("遞增因子必須大于0");
        }
        return redisTemplate.opsForValue().increment(key, delta);
    }
    /**
     * 遞減
     *
     * @param key   鍵
     * @param delta 要減少幾(小于0)
     */
    public long decr(String key, long delta) {
        if (delta < 0) {
            throw new RuntimeException("遞減因子必須大于0");
        }
        return redisTemplate.opsForValue().increment(key, -delta);
    }
    // ================================Map=================================
    /**
     * HashGet
     *
     * @param key  鍵 不能為null
     * @param item 項(xiàng) 不能為null
     */
    public Object hget(String key, String item) {
        return redisTemplate.opsForHash().get(key, item);
    }
    /**
     * 獲取hashKey對(duì)應(yīng)的所有鍵值
     *
     * @param key 鍵
     * @return 對(duì)應(yīng)的多個(gè)鍵值
     */
    public Map<Object, Object> hmget(String key) {
        return redisTemplate.opsForHash().entries(key);
    }
    /**
     * HashSet
     *
     * @param key 鍵
     * @param map 對(duì)應(yīng)多個(gè)鍵值
     */
    public boolean hmset(String key, Map<String, Object> map) {
        try {
            redisTemplate.opsForHash().putAll(key, map);
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }
    /**
     * HashSet 并設(shè)置時(shí)間
     *
     * @param key  鍵
     * @param map  對(duì)應(yīng)多個(gè)鍵值
     * @param time 時(shí)間(秒)
     * @return true成功 false失敗
     */
    public boolean hmset(String key, Map<String, Object> map, long time) {
        try {
            redisTemplate.opsForHash().putAll(key, map);
            if (time > 0) {
                expire(key, time);
            }
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }
    /**
     * 向一張hash表中放入數(shù)據(jù),如果不存在將創(chuàng)建
     *
     * @param key   鍵
     * @param item  項(xiàng)
     * @param value 值
     * @return true 成功 false失敗
     */
    public boolean hset(String key, String item, Object value) {
        try {
            redisTemplate.opsForHash().put(key, item, value);
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }
    /**
     * 向一張hash表中放入數(shù)據(jù),如果不存在將創(chuàng)建
     *
     * @param key   鍵
     * @param item  項(xiàng)
     * @param value 值
     * @param time  時(shí)間(秒) 注意:如果已存在的hash表有時(shí)間,這里將會(huì)替換原有的時(shí)間
     * @return true 成功 false失敗
     */
    public boolean hset(String key, String item, Object value, long time) {
        try {
            redisTemplate.opsForHash().put(key, item, value);
            if (time > 0) {
                expire(key, time);
            }
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }
    /**
     * 刪除hash表中的值
     *
     * @param key  鍵 不能為null
     * @param item 項(xiàng) 可以使多個(gè) 不能為null
     */
    public void hdel(String key, Object... item) {
        redisTemplate.opsForHash().delete(key, item);
    }
    /**
     * 判斷hash表中是否有該項(xiàng)的值
     *
     * @param key  鍵 不能為null
     * @param item 項(xiàng) 不能為null
     * @return true 存在 false不存在
     */
    public boolean hHasKey(String key, String item) {
        return redisTemplate.opsForHash().hasKey(key, item);
    }
    /**
     * hash遞增 如果不存在,就會(huì)創(chuàng)建一個(gè) 并把新增后的值返回
     *
     * @param key  鍵
     * @param item 項(xiàng)
     * @param by   要增加幾(大于0)
     */
    public double hincr(String key, String item, double by) {
        return redisTemplate.opsForHash().increment(key, item, by);
    }
    /**
     * hash遞減
     *
     * @param key  鍵
     * @param item 項(xiàng)
     * @param by   要減少記(小于0)
     */
    public double hdecr(String key, String item, double by) {
        return redisTemplate.opsForHash().increment(key, item, -by);
    }
    // ============================set=============================
    /**
     * 根據(jù)key獲取Set中的所有值
     *
     * @param key 鍵
     */
    public Set<Object> sGet(String key) {
        try {
            return redisTemplate.opsForSet().members(key);
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
    /**
     * 根據(jù)value從一個(gè)set中查詢(xún),是否存在
     *
     * @param key   鍵
     * @param value 值
     * @return true 存在 false不存在
     */
    public boolean sHasKey(String key, Object value) {
        try {
            return redisTemplate.opsForSet().isMember(key, value);
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }
    /**
     * 將數(shù)據(jù)放入set緩存
     *
     * @param key    鍵
     * @param values 值 可以是多個(gè)
     * @return 成功個(gè)數(shù)
     */
    public long sSet(String key, Object... values) {
        try {
            return redisTemplate.opsForSet().add(key, values);
        } catch (Exception e) {
            e.printStackTrace();
            return 0;
        }
    }
    /**
     * 將set數(shù)據(jù)放入緩存
     *
     * @param key    鍵
     * @param time   時(shí)間(秒)
     * @param values 值 可以是多個(gè)
     * @return 成功個(gè)數(shù)
     */
    public long sSetAndTime(String key, long time, Object... values) {
        try {
            Long count = redisTemplate.opsForSet().add(key, values);
            if (time > 0) {
                expire(key, time);
            }
            return count;
        } catch (Exception e) {
            e.printStackTrace();
            return 0;
        }
    }
    /**
     * 獲取set緩存的長(zhǎng)度
     *
     * @param key 鍵
     */
    public long sGetSetSize(String key) {
        try {
            return redisTemplate.opsForSet().size(key);
        } catch (Exception e) {
            e.printStackTrace();
            return 0;
        }
    }
    /**
     * 移除值為value的
     *
     * @param key    鍵
     * @param values 值 可以是多個(gè)
     * @return 移除的個(gè)數(shù)
     */
    public long setRemove(String key, Object... values) {
        try {
            Long count = redisTemplate.opsForSet().remove(key, values);
            return count;
        } catch (Exception e) {
            e.printStackTrace();
            return 0;
        }
    }
    // ===============================list=================================
    /**
     * 獲取list緩存的內(nèi)容
     *
     * @param key   鍵
     * @param start 開(kāi)始
     * @param end   結(jié)束 0 到 -1代表所有值
     */
    public List<Object> lGet(String key, long start, long end) {
        try {
            return redisTemplate.opsForList().range(key, start, end);
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
    /**
     * 獲取第一個(gè)元素并彈出
     *
     * @param key key
     * @return 第一個(gè)元素
     */
    public Object lPop(String key) {
        try {
            return redisTemplate.opsForList().leftPop(key);
        } catch (Exception e) {
            return null;
        }
    }
    /**
     * 阻塞時(shí)間獲取
     * @param key
     * @param timeout 秒
     * @return
     */
    public Object lPop(String key,long timeout) {
        try {
            return redisTemplate.opsForList().leftPop(key,timeout,TimeUnit.SECONDS);
        } catch (Exception e) {
            return null;
        }
    }
    /**
     * 獲取list緩存的長(zhǎng)度
     *
     * @param key 鍵
     */
    public long lGetListSize(String key) {
        try {
            return redisTemplate.opsForList().size(key);
        } catch (Exception e) {
            e.printStackTrace();
            return 0;
        }
    }
    /**
     * 通過(guò)索引 獲取list中的值
     *
     * @param key   鍵
     * @param index 索引 index>=0時(shí), 0 表頭,1 第二個(gè)元素,依次類(lèi)推;index<0時(shí),-1,表尾,-2倒數(shù)第二個(gè)元素,依次類(lèi)推
     */
    public Object lGetIndex(String key, long index) {
        try {
            return redisTemplate.opsForList().index(key, index);
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
    /**
     * 將list放入緩存
     *
     * @param key   鍵
     * @param value 值
     */
    public boolean lSet(String key, Object value) {
        try {
            redisTemplate.opsForList().rightPush(key, value);
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }
    /**
     * 將list放入緩存
     *
     * @param key   鍵
     * @param value 值
     * @param time  時(shí)間(秒)
     */
    public boolean lSet(String key, Object value, long time) {
        try {
            redisTemplate.opsForList().rightPush(key, value);
            if (time > 0) {
                expire(key, time);
            }
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }
    /**
     * 將list放入緩存
     *
     * @param key   鍵
     * @param value 值
     * @return
     */
    public boolean lSet(String key, List<Object> value) {
        try {
            redisTemplate.opsForList().rightPushAll(key, value);
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }
    /**
     * 將list放入緩存
     *
     * @param key   鍵
     * @param value 值
     * @param time  時(shí)間(秒)
     * @return
     */
    public boolean lSet(String key, List<Object> value, long time) {
        try {
            redisTemplate.opsForList().rightPushAll(key, value);
            if (time > 0) {
                expire(key, time);
            }
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }
    /**
     * 根據(jù)索引修改list中的某條數(shù)據(jù)
     *
     * @param key   鍵
     * @param index 索引
     * @param value 值
     * @return
     */
    public boolean lUpdateIndex(String key, long index, Object value) {
        try {
            redisTemplate.opsForList().set(key, index, value);
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }
    /**
     * 移除N個(gè)值為value
     *
     * @param key   鍵
     * @param count 移除多少個(gè)
     * @param value 值
     * @return 移除的個(gè)數(shù)
     */
    public long lRemove(String key, long count, Object value) {
        try {
            Long remove = redisTemplate.opsForList().remove(key, count, value);
            return remove;
        } catch (Exception e) {
            e.printStackTrace();
            return 0;
        }
    }
}

4.啟動(dòng)類(lèi)

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
 * @Author: albc
 * @Date: 2025/04/17/10:03
 * @Description: good good study,day day up
 */
@SpringBootApplication
public class AiApplication {
    public static void main(String[] args) {
        SpringApplication.run(AiApplication.class,args);
        System.out.println("啟動(dòng)成功");
    }
}

5.測(cè)試類(lèi)

import lombok.Data;
/**
 * @Author: albc
 * @Date: 2025/04/17/10:12
 * @Description: good good study,day day up
 */
@Data
public class TestDto {
    private String content;
}

6.測(cè)試方法

import com.alibaba.dashscope.aigc.generation.Generation;
import com.alibaba.dashscope.aigc.generation.GenerationParam;
import com.alibaba.dashscope.aigc.generation.GenerationResult;
import com.alibaba.dashscope.common.Message;
import com.alibaba.dashscope.common.Role;
import com.alibaba.dashscope.exception.ApiException;
import com.alibaba.dashscope.exception.InputRequiredException;
import com.alibaba.dashscope.exception.NoApiKeyException;
import com.atkj.dto.TestDto;
import com.atkj.util.RedisUtil;
import io.reactivex.Flowable;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
/**
 * @Author: albc
 * @Date: 2025/04/17/10:02
 * @Description: good good study,day day up
 */
@RequestMapping("/test")
@RestController
public class TestController {
    /**
     * 問(wèn)題分析
     */
    private static StringBuilder reasoningContent = new StringBuilder();
    /**
     * 完整回復(fù)
     */
    private static StringBuilder finalContent = new StringBuilder();
    private static boolean isFirstPrint = true;
    @Autowired
    private RedisUtil redisUtil;
    @PostMapping("/testRdisListSet")
    public String testRdisList(){
        return "Ai測(cè)試方法";
    }
    @PostMapping("/testAi")
    @ResponseBody
    public void testAi(HttpServletResponse httpServletResponse,@RequestBody TestDto testDto){
        //正式版本自定義線(xiàn)程池,禁止創(chuàng)建線(xiàn)程
        new Thread(()->{try {
            String content = testDto.getContent();
            Generation gen = new Generation();
            Message userMsg = Message.builder().role(Role.USER.getValue()).content(content).build();
            streamCallWithMessage(gen, userMsg);
//             打印最終結(jié)果
//            if (reasoningContent.length() > 0) {
//                System.out.println("\n====================完整回復(fù)====================");
//                System.out.println(finalContent.toString());
//            }
        } catch (ApiException | NoApiKeyException | InputRequiredException e) {
            System.out.println("An exception occurred:"+e.getMessage());
        }}).start();
        httpServletResponse.setContentType("text/event-stream");
        httpServletResponse.setCharacterEncoding("utf-8");
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String s = "";
        while (true) {
            Object deep = redisUtil.lPop("deep",5);
            if (deep == null){
                break;
            }
            s = "data: " + deep + "\n\n";
            try {
                PrintWriter pw = httpServletResponse.getWriter();
                Thread.sleep(10L);
                pw.write(s);
                pw.flush();
            } catch (IOException | InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
    private void handleGenerationResult(GenerationResult message) {
        String reasoning = message.getOutput().getChoices().get(0).getMessage().getReasoningContent();
        String content = message.getOutput().getChoices().get(0).getMessage().getContent();
        if (!reasoning.isEmpty()) {
           // reasoningContent.append(reasoning);
            if (isFirstPrint) {
                System.out.println("====================思考過(guò)程====================");
                isFirstPrint = false;
            }
            redisUtil.lSet("deep", reasoning);
            System.out.print(reasoning);
        }
        if (!content.isEmpty()) {
            //finalContent.append(content);
            if (!isFirstPrint) {
                System.out.println("\n====================完整回復(fù)====================");
                isFirstPrint = true;
            }
            redisUtil.lSet("deep", content);
            System.out.print(content);
        }
    }
    private static GenerationParam buildGenerationParam(Message userMsg) {
        return GenerationParam.builder()
                // 若沒(méi)有配置環(huán)境變量,請(qǐng)用百煉API Key將下行替換為:.apiKey("sk-xxx") //qwen-plus,deepseek-r1
                .apiKey("sk-123123123123123123123123123123123")
                .model("deepseek-r1")
                .messages(Arrays.asList(userMsg))
                // 不可以設(shè)置為"text"
                .resultFormat(GenerationParam.ResultFormat.MESSAGE)
                .incrementalOutput(true)
                .build();
    }
    public void streamCallWithMessage(Generation gen, Message userMsg)
            throws NoApiKeyException, ApiException, InputRequiredException {
        GenerationParam param = buildGenerationParam(userMsg);
        Flowable<GenerationResult> result = gen.streamCall(param);
        result.blockingForEach(message -> handleGenerationResult(message));
    }
}

7.配置文件

server:
  port: 18868
spring:
  redis:
    host: 192.168.11.198
    port: 7366
    password: 123321
    database: 0

8.測(cè)試結(jié)果

http://127.0.0.1:18868/test/testAi

到此這篇關(guān)于springboot整合阿里云百煉DeepSeek實(shí)現(xiàn)sse流式打印的操作方法的文章就介紹到這了,更多相關(guān)springboot整合阿里云百煉DeepSeek內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • 詳解Java實(shí)現(xiàn)多線(xiàn)程的三種方式

    詳解Java實(shí)現(xiàn)多線(xiàn)程的三種方式

    線(xiàn)程(英語(yǔ):thread)是操作系統(tǒng)能夠進(jìn)行運(yùn)算調(diào)度的最小單位。它被包含在進(jìn)程之中,是進(jìn)程中的實(shí)際運(yùn)作單位。本文總結(jié)了Java多線(xiàn)程是三種實(shí)現(xiàn)方式,需要的可以參考一下
    2022-03-03
  • SpringBoot3和4的版本新特性及升級(jí)要點(diǎn)詳解

    SpringBoot3和4的版本新特性及升級(jí)要點(diǎn)詳解

    Spring Boot 4.0作為生態(tài)內(nèi)的重大更新,基于Spring Framework 6.1+ 構(gòu)建,帶來(lái)了一系列顛覆性?xún)?yōu)化,這篇文章主要介紹了SpringBoot3和4的版本新特性及升級(jí)要點(diǎn)的相關(guān)資料,需要的朋友可以參考下
    2026-03-03
  • Springboot的application.properties或application.yml環(huán)境的指定運(yùn)行與配置方式

    Springboot的application.properties或application.yml環(huán)境的指定運(yùn)行與配置方

    本文主要介紹了Spring?Boot中配置文件的多種使用方式,包括配置文件的命名、激活、路徑指定以及優(yōu)先級(jí),并結(jié)合示例進(jìn)行了詳細(xì)說(shuō)明
    2025-11-11
  • 解決swagger2中@ApiResponse的response不起作用

    解決swagger2中@ApiResponse的response不起作用

    這篇文章主要介紹了解決swagger2中@ApiResponse的response不起作用問(wèn)題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2022-06-06
  • mybatis中的setting配置詳解

    mybatis中的setting配置詳解

    這篇文章主要給大家介紹了關(guān)于mybatis中setting配置的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面來(lái)一起看看吧。
    2017-06-06
  • SpringBoot實(shí)現(xiàn)ImportBeanDefinitionRegistrar動(dòng)態(tài)注入

    SpringBoot實(shí)現(xiàn)ImportBeanDefinitionRegistrar動(dòng)態(tài)注入

    在閱讀Spring Boot源碼時(shí),看到Spring Boot中大量使用ImportBeanDefinitionRegistrar來(lái)實(shí)現(xiàn)Bean的動(dòng)態(tài)注入,它是Spring中一個(gè)強(qiáng)大的擴(kuò)展接口,本文就來(lái)詳細(xì)的介紹一下如何使用,感興趣的可以了解一下
    2024-02-02
  • Spring三級(jí)緩存解決循環(huán)依賴(lài)

    Spring三級(jí)緩存解決循環(huán)依賴(lài)

    本文主要介紹了Spring三級(jí)緩存解決循環(huán)依賴(lài),文中通過(guò)示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2021-12-12
  • mybatis-plus復(fù)合主鍵的使用

    mybatis-plus復(fù)合主鍵的使用

    本文主要介紹了mybatis-plus復(fù)合主鍵的使用,文中通過(guò)示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2022-03-03
  • Java+EasyExcel實(shí)現(xiàn)單個(gè)接口導(dǎo)出多個(gè)Excel的示例詳解

    Java+EasyExcel實(shí)現(xiàn)單個(gè)接口導(dǎo)出多個(gè)Excel的示例詳解

    在日常開(kāi)發(fā)中,我們經(jīng)常會(huì)遇到?Excel?導(dǎo)出的需求,大多是單個(gè)接口導(dǎo)出單個(gè)?Excel?文件,今天就基于?Spring?Boot?+?EasyExcel分享一種簡(jiǎn)單、通用、可直接落地的實(shí)現(xiàn)方案,全程附完整代碼,新手也能快速上手
    2026-04-04
  • Spring Boot Rest控制器單元測(cè)試過(guò)程解析

    Spring Boot Rest控制器單元測(cè)試過(guò)程解析

    這篇文章主要介紹了Spring Boot Rest控制器單元測(cè)試過(guò)程解析,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下
    2020-03-03

最新評(píng)論

华池县| 钟山县| 松江区| 东阳市| 广安市| 金秀| 晴隆县| 五指山市| 白沙| 潮州市| 元阳县| 改则县| 阿城市| 宜兴市| 甘孜| 闽侯县| 舒兰市| 柳州市| 景宁| 文成县| 宁波市| 墨竹工卡县| 自治县| 宾阳县| 赣榆县| 定兴县| 洛南县| 施秉县| 青河县| 南江县| 精河县| 防城港市| 永城市| 晋州市| 安宁市| 体育| 全椒县| 汶川县| 白银市| 墨玉县| 凤台县|