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

SpringBoot?整合?Langchain4j?AIService?深度使用操作實(shí)戰(zhàn)教程

 更新時(shí)間:2025年08月07日 10:42:33   作者:duration  
文章介紹LangChain4j中AIService組件,通過(guò)封裝大模型調(diào)用邏輯,簡(jiǎn)化Java應(yīng)用對(duì)接LLM的流程,支持多模型切換、異步調(diào)用及@SystemMessage注解增強(qiáng)擴(kuò)展性,實(shí)現(xiàn)靈活的AI服務(wù)集成與調(diào)用,對(duì)SpringBoot?Langchain4j?AIService使用感興趣的朋友一起看看吧

一、前言

LangChain4j 是一個(gè)基于 Java 的框架,旨在簡(jiǎn)化與大型語(yǔ)言模型(LLMs)的集成和應(yīng)用開(kāi)發(fā)。它提供了豐富的工具和組件,幫助開(kāi)發(fā)者快速構(gòu)建基于 LLM 的應(yīng)用程序,如聊天機(jī)器人、問(wèn)答系統(tǒng)、文本生成等。利用LangChain4j ,SpringBoot微服務(wù)應(yīng)用可以快速實(shí)現(xiàn)對(duì)接市場(chǎng)上各種主流大模型的能力,從而快速驗(yàn)證業(yè)務(wù)的價(jià)值,本文以L(fǎng)angChain4j 中一個(gè)非常核心的與大模型交互的組件AIService 為例進(jìn)行詳細(xì)的說(shuō)明。

市場(chǎng)上主流的 Java 調(diào)用大模型的工具庫(kù)有兩種:

  • LangChain4j
  • Spring AI

LangChain4j 是一個(gè) 面向 Java 的開(kāi)源框架,用于構(gòu)建 基于大語(yǔ)言模型(LLMs) 的應(yīng)用程序。

它是 LangChain(Python 生態(tài)中非常流行的 LLM 應(yīng)用框架)的 Java 實(shí)現(xiàn),旨在讓 Java 開(kāi)發(fā)者能夠輕松地集成和使用各種 LLM 服務(wù),快速開(kāi)發(fā) 智能聊天機(jī)器人、智能搜索、文檔問(wèn)答、Agent系統(tǒng) 等 AI 驅(qū)動(dòng)的應(yīng)用。

官網(wǎng)文檔:https://docs.langchain4j.dev/。

二、AIService 介紹

2.1 AiService 是什么

AiService 是 LangChain4j 中的一個(gè)核心組件,用于將 AI 模型(如 OpenAI、通義千問(wèn),DeepSeek,Hugging Face 等)的能力封裝為服務(wù)接口,方便開(kāi)發(fā)者調(diào)用。通過(guò) AiService,開(kāi)發(fā)者可以輕松地將 AI 模型集成到應(yīng)用程序中,而無(wú)需直接處理復(fù)雜的模型調(diào)用和數(shù)據(jù)處理邏輯。

2.2 AiService 主要功能

AiService 主要提供了如下的功能:

  • 模型調(diào)用封裝:
    • AiService 將 AI 模型的調(diào)用邏輯封裝為簡(jiǎn)單的 Java 接口,開(kāi)發(fā)者只需定義接口方法即可調(diào)用模型。
  • 自動(dòng)請(qǐng)求/響應(yīng)處理:
    • AiService 會(huì)自動(dòng)處理輸入數(shù)據(jù)的預(yù)處理和輸出數(shù)據(jù)的后處理,簡(jiǎn)化開(kāi)發(fā)流程。
  • 多模型支持:
    • 支持多種 AI 模型(如 GPT、BERT 等),并可以根據(jù)需要切換模型。
  • 異步調(diào)用:
    • 支持異步調(diào)用 AI 模型,提升應(yīng)用程序的性能和響應(yīng)速度。

2.3 AiService 使用步驟

AiService 在實(shí)際開(kāi)發(fā)使用中,遵循下面的幾步即可:

  • 定義服務(wù)接口:創(chuàng)建一個(gè) Java 接口,定義需要調(diào)用的 AI 模型功能。
  • 配置模型:在配置文件中指定使用的 AI 模型及其參數(shù)。
  • 創(chuàng)建服務(wù)實(shí)例:通過(guò) AiService 創(chuàng)建服務(wù)實(shí)例。
  • 調(diào)用服務(wù):通過(guò)服務(wù)實(shí)例調(diào)用定義的方法,獲取 AI 模型的輸出。

通過(guò) AiService,開(kāi)發(fā)者可以更高效地將 AI 能力集成到 Java 應(yīng)用程序中,降低開(kāi)發(fā)復(fù)雜度,提升開(kāi)發(fā)效率。

三、AIService 操作實(shí)踐

3.1 前置準(zhǔn)備

3.1.1 獲取apikey

為了方便與大模型交互,本文案例使用阿里云百煉平臺(tái)進(jìn)行對(duì)接,所以需要先去百煉大模型平臺(tái)獲取apikey,操作入口:大模型服務(wù)平臺(tái)百煉控制臺(tái)

3.1.2 導(dǎo)入核心依賴(lài)

創(chuàng)建一個(gè)springboot 工程,并導(dǎo)入下面的核心依賴(lài)

<properties>
     <maven.compiler.source>17</maven.compiler.source>
     <maven.compiler.target>17</maven.compiler.target>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <spring-boot.version>3.2.6</spring-boot.version>
     <langchain4j.version>1.0.0-beta3</langchain4j.version>
     <mybatis-plus.version>3.5.11</mybatis-plus.version>
 </properties>
 <dependencies>
     <!-- web應(yīng)用程序核心依賴(lài) -->
     <dependency>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-web</artifactId>
     </dependency>
     <!-- 編寫(xiě)和運(yùn)行測(cè)試用例 -->
     <dependency>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-test</artifactId>
         <scope>test</scope>
     </dependency>
     <!-- 接入阿里云百煉平臺(tái) -->
     <dependency>
         <groupId>dev.langchain4j</groupId>
         <artifactId>langchain4j-community-dashscope-spring-boot-starter</artifactId>
     </dependency>
     <!--langchain4j高級(jí)功能-->
     <dependency>
         <groupId>dev.langchain4j</groupId>
         <artifactId>langchain4j-spring-boot-starter</artifactId>
     </dependency>
 </dependencies>
 <dependencyManagement>
     <dependencies>
         <!--引入SpringBoot依賴(lài)管理清單-->
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-dependencies</artifactId>
             <version>${spring-boot.version}</version>
             <type>pom</type>
             <scope>import</scope>
         </dependency>
         <!--引入langchain4j依賴(lài)管理清單-->
         <dependency>
             <groupId>dev.langchain4j</groupId>
             <artifactId>langchain4j-bom</artifactId>
             <version>${langchain4j.version}</version>
             <type>pom</type>
             <scope>import</scope>
         </dependency>
         <!--引入百煉依賴(lài)管理清單-->
         <dependency>
             <groupId>dev.langchain4j</groupId>
             <artifactId>langchain4j-community-bom</artifactId>
             <version>${langchain4j.version}</version>
             <type>pom</type>
             <scope>import</scope>
         </dependency>
     </dependencies>
 </dependencyManagement>

3.1.3 添加配置文件

在工程的配置文件中添加下面的配置信息

server:
  port: 8082
#直接對(duì)接的是deepseek官網(wǎng)的的大模型
langchain4j:
  #阿里百煉平臺(tái)的模型
  community:
    dashscope:
      chat-model:
        api-key: 你的apikey  #這個(gè)是白煉平臺(tái)的apikey
        model-name: qwen-max
logging:
  level:
    root: debug

3.1.4 前置導(dǎo)入案例

還記得在之前學(xué)習(xí)Langchain4j與大模型整合進(jìn)行對(duì)話(huà)時(shí),像下面的這樣的接口寫(xiě)法:

package com.congge.controller;
import dev.langchain4j.community.model.dashscope.QwenChatModel;
import dev.langchain4j.model.openai.OpenAiChatModel;
import dev.langchain4j.model.output.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.net.URI;
@RestController
@RequestMapping("/qwen")
public class QwenCahtController {
    @Autowired
    private QwenChatModel qwenChatModel;
    //localhost:8082/qwen/chat?question=你是誰(shuí)
    @GetMapping("/chat")
    public Object chat(@RequestParam("question") String question){
        String chat = qwenChatModel.chat(question);
        return chat;
    }
}

調(diào)用一下接口,可以得到預(yù)期的結(jié)果

盡管大模型給出了回復(fù),但是細(xì)心的同學(xué)會(huì)發(fā)現(xiàn),這種方式的實(shí)現(xiàn),很明顯在調(diào)用chat方法的時(shí)候需要依賴(lài)具體的模型提供商,假如說(shuō)本次使用的是千問(wèn)大模型,下一次如果更換為openai大模型,再下一次更換為deepseek的話(huà),代碼是不是就需要調(diào)整了,這么來(lái)看,使用這種方式是存在一定的局限性的,于是在Langchain4j中,還提供了另一種更為簡(jiǎn)單靈活,并且更優(yōu)雅的實(shí)現(xiàn)方式,即使用AIService 這個(gè)組件。

3.2 AIService 案例操作詳解

官方文檔:AI Services | LangChain4j

3.2.1 入門(mén)案例使用

參考官方文檔可以看到,AIService 的使用很簡(jiǎn)單。首先需要定義一個(gè)接口,里面定義一個(gè)chat方法,然后基于A(yíng)iServices 這個(gè)對(duì)象創(chuàng)建chat方法所在的接口代理對(duì)象,最后就可以調(diào)用這個(gè)chat方法與大模型進(jìn)行對(duì)話(huà)了。

1)定義一個(gè)接口

如下,自定義一個(gè)接口,里面有一個(gè)chat方法

package com.congge.assistant;
public interface Assistant {
    String chat(String userMessage);
}

2)添加測(cè)試接口

添加一個(gè)測(cè)試接口,從下面這段代碼不難看出,使用這種方式,其核心就是通過(guò)AiServices這個(gè)對(duì)象創(chuàng)建出接口的帶理對(duì)象,然后再由帶理對(duì)象調(diào)用chat方法,相比傳統(tǒng)的方式,這樣的寫(xiě)法顯得更加靈活便捷

package com.congge.controller;
import com.congge.assistant.Assistant;
//import com.congge.assistant.QwenAssistant;
import dev.langchain4j.community.model.dashscope.QwenChatModel;
import dev.langchain4j.service.AiServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/assistant")
public class AssistantController {
    @Autowired
    private QwenChatModel qwenChatModel;
    //localhost:8082/assistant/chat/v1?userMessage=你是誰(shuí)
    @GetMapping("/chat/v1")
    public String chat(@RequestParam("userMessage") String userMessage) {
        Assistant assistant = AiServices.create(Assistant.class, qwenChatModel);
        String chatRes = assistant.chat(userMessage);
        return chatRes;
    }
}

3)接口效果測(cè)試

啟動(dòng)工程后,調(diào)用下接口,可以正常與大模型進(jìn)行對(duì)話(huà)

3.2.2 簡(jiǎn)化寫(xiě)法

上面這種方式需要通過(guò)AiServices對(duì)象創(chuàng)建代理對(duì)象來(lái)調(diào)用,實(shí)際上,AiService還提供了更簡(jiǎn)單的方式,即只需要在接口上面增加一個(gè) @AiService注解即可 ,這樣就可以直接將接口注入到需要調(diào)用的類(lèi)中就能使用了,簡(jiǎn)單改造下,如下代碼:

1)接口改造

package com.congge.assistant;
import dev.langchain4j.service.spring.AiService;
@AiService
public interface Assistant {
    String chat(String userMessage);
}

2)測(cè)試接口

改為注入Assistant

package com.congge.controller;
import com.congge.assistant.Assistant;
//import com.congge.assistant.QwenAssistant;
import dev.langchain4j.community.model.dashscope.QwenChatModel;
import dev.langchain4j.service.AiServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/assistant")
public class AssistantController {
    @Autowired
    private Assistant assistant;
    //localhost:8082/assistant/chat/v1?userMessage=你是誰(shuí)
    @GetMapping("/chat/v1")
    public String chat(@RequestParam("userMessage") String userMessage) {
        //Assistant assistant = AiServices.create(Assistant.class, qwenChatModel);
        String chatRes = assistant.chat(userMessage);
        return chatRes;
    }
}

3)效果測(cè)試

調(diào)用一下接口,可以看到仍然可以得到預(yù)期的效果

3.2.3 問(wèn)題說(shuō)明

基于上面的這一步,細(xì)心的同學(xué)會(huì)發(fā)現(xiàn),使用上面帶注解的方式改造后,在測(cè)試的接口中并沒(méi)有注入具體的ChatModel,最后也能夠正常與大模型對(duì)話(huà),這是因?yàn)樵谏厦娴呐渲梦募?,我們配置的是與百煉的apikey,使用的是千問(wèn)大模型,所以@AiService 注解就會(huì)在上下文環(huán)境中查找并自動(dòng)注入了千問(wèn)的ChatModel,在@AiService注解源碼中也可以看到該注解可以接收一個(gè)chatModel的屬性

但是假如在你的配置文件中,同時(shí)配置了多個(gè)大模型廠(chǎng)商的信息,在工程啟動(dòng)的時(shí)候報(bào)就會(huì)報(bào)下面找不到ChatModel的錯(cuò)誤

遇到這個(gè)問(wèn)題的時(shí)候,在控制臺(tái)中,錯(cuò)誤的提示中也給出了解決建議

參照這個(gè)提示,接口改造后代碼如下:

package com.congge.assistant;
import dev.langchain4j.service.spring.AiService;
import dev.langchain4j.service.spring.AiServiceWiringMode;
@AiService(wiringMode = AiServiceWiringMode.EXPLICIT, chatModel = "qwenChatModel")
public interface Assistant {
    String chat(String userMessage);
}

再次啟動(dòng)的時(shí)候,如果保持配置文件不變,仍然配置了多個(gè)大模型的信息,此時(shí)就不會(huì)報(bào)錯(cuò)了。

3.3 AIService 高級(jí)用法

3.3.1 @SystemMessage 注解使用

AIService 還可以基于接口中的方法,搭配@SystemMessage 注解使用,通過(guò)這個(gè)注解,可以賦予接口中的方法更靈活的能力,比如在實(shí)際使用中,為了將這個(gè)chat方法以更靈活的模板方式進(jìn)行封裝,可以通過(guò)傳入更多的參數(shù),然后以參數(shù)的形式傳遞到模板描述中,如下:

import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.V;
import dev.langchain4j.service.spring.AiService;
@AiService
public interface Assistant {
    //String chat(String userMessage);
    @SystemMessage("你是一個(gè)知名的散文作家,根據(jù)輸入的{{title}},寫(xiě)一篇不超過(guò){{count}}字的散文")
    String chat(@UserMessage String message, @V("title") String title, @V("count") Long count);
}

3.3.2 添加測(cè)試接口

增加一個(gè)測(cè)試接口,可以接收上述新增的方法中的多個(gè)參數(shù)

package com.congge.controller;
import com.congge.assistant.Assistant;
//import com.congge.assistant.QwenAssistant;
import dev.langchain4j.community.model.dashscope.QwenChatModel;
import dev.langchain4j.service.AiServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/assistant")
public class AssistantController {
    @Autowired
    private Assistant assistant;
    //localhost:8082/assistant/chat/v1?userMessage=歌頌祖國(guó)的大好河山&title=歌頌祖國(guó)的大好河山&count=300
    @GetMapping("/chat/v1")
    public String chat(
            @RequestParam("userMessage") String userMessage,
            @RequestParam("title") String title,
            @RequestParam("count") Long count) {
        String chatRes = assistant.chat(userMessage, title, count);
        return chatRes;
    }
}    

3.3.3 接口效果測(cè)試

調(diào)用一下接口,可以看到下面的效果

不難看出,有了@SystemMessage這個(gè)注解,在實(shí)際的開(kāi)發(fā)中,讓對(duì)接大模型的程序,在設(shè)計(jì)上提供了更多的擴(kuò)展性,也讓程序的可定制性增強(qiáng)了,從而讓?xiě)?yīng)用更靈活。

3.4 AIService 原理解讀

3.4.1 AIService 核心原理

AiServices會(huì)組裝Assistant接口以及其他組件,并使用反射機(jī)制創(chuàng)建一個(gè)實(shí)現(xiàn)Assistant接口的代理對(duì)象。這個(gè)代理對(duì)象會(huì)處理輸入和輸出的所有轉(zhuǎn)換工作。在上面的案例中,chat方法的輸入是一個(gè)字符串,但是大模型需要一個(gè) UserMessage 對(duì)象。所以,代理對(duì)象將這個(gè)字符串轉(zhuǎn)換為 UserMessage ,并調(diào)用聊天語(yǔ)言模型。chat方法的輸出類(lèi)型也是字符串,但是大模型返回的是 AiMessage 對(duì)象,代理對(duì)象會(huì)將其轉(zhuǎn)換為字符串。

3.4.2 AIService 代碼跟蹤

通過(guò)上面的代碼演示基本掌握了AIService的用法,下面對(duì)其原理做一下詳細(xì)的說(shuō)明,方便我們對(duì)其底層設(shè)計(jì)有更深刻的理解,通過(guò) AiServices.create 方法進(jìn)入到下面的源碼中

public static <T> T create(Class<T> aiService, ChatLanguageModel chatLanguageModel) {
    return builder(aiService).chatLanguageModel(chatLanguageModel).build();
}

啟動(dòng)工程后,執(zhí)行接口調(diào)用 ,進(jìn)入到下面的 new DefaultAiServices 方法

繼續(xù)往下走,進(jìn)入到下面的方法,在這個(gè)方法中可以看到,需要接收aiService 和 chatLanguageModel

這一步創(chuàng)建完成后,代理對(duì)象就有了,最后使用assistant調(diào)用chat方法的時(shí)候,通過(guò)debug源碼可以看到,此時(shí)的assistant就是一個(gè)代理對(duì)象了

四、寫(xiě)在文末

本文通過(guò)較大的篇幅詳細(xì)介紹了Langchain4j中的核心組件AIService的使用,并通過(guò)案例演示了其實(shí)際的使用過(guò)程,希望對(duì)看到的同學(xué)有用哦,本篇到此結(jié)束,感謝觀(guān)看。

到此這篇關(guān)于SpringBoot 整合 Langchain4j AIService 深度使用操作實(shí)戰(zhàn)教程的文章就介紹到這了,更多相關(guān)SpringBoot Langchain4j AIService使用內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • Java集成Onlyoffice的示例代碼及場(chǎng)景分析

    Java集成Onlyoffice的示例代碼及場(chǎng)景分析

    這篇文章主要介紹了Java集成Onlyoffice的示例代碼及場(chǎng)景分析,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友參考下吧
    2025-05-05
  • SpringBoot項(xiàng)目中如何實(shí)現(xiàn)MySQL讀寫(xiě)分離詳解

    SpringBoot項(xiàng)目中如何實(shí)現(xiàn)MySQL讀寫(xiě)分離詳解

    在高并發(fā)下需要對(duì)應(yīng)用進(jìn)行讀寫(xiě)分離,配置多數(shù)據(jù)源,即寫(xiě)操作走主庫(kù),讀操作則走從庫(kù),主從數(shù)據(jù)庫(kù)負(fù)責(zé)各自的讀和寫(xiě),緩解了鎖的爭(zhēng)用,提高了讀取性能,這篇文章主要給大家介紹了關(guān)于SpringBoot項(xiàng)目中如何實(shí)現(xiàn)MySQL讀寫(xiě)分離的相關(guān)資料,需要的朋友可以參考下
    2022-07-07
  • Java關(guān)于MyBatis緩存詳解

    Java關(guān)于MyBatis緩存詳解

    緩存的重要性是不言而喻的,使用緩存,我們可以避免頻繁的與數(shù)據(jù)庫(kù)進(jìn)行交互,尤其是在查詢(xún)?cè)蕉唷⒕彺婷新试礁叩那闆r下,使用緩存對(duì)性能的提高更明顯。本文將給大家詳細(xì)的介紹,對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值
    2021-09-09
  • 關(guān)于阿里巴巴TransmittableThreadLocal使用解讀

    關(guān)于阿里巴巴TransmittableThreadLocal使用解讀

    文章主要介紹了三種ThreadLocal的使用:ThreadLocal、InheritableThreadLocal和TransmittableThreadLocal,ThreadLocal和InheritableThreadLocal在單線(xiàn)程和部分情況下可以正常工作,但TransmittableThreadLocal在處理線(xiàn)程池時(shí)表現(xiàn)更佳
    2025-02-02
  • Java 創(chuàng)建兩個(gè)線(xiàn)程模擬對(duì)話(huà)并交替輸出實(shí)現(xiàn)解析

    Java 創(chuàng)建兩個(gè)線(xiàn)程模擬對(duì)話(huà)并交替輸出實(shí)現(xiàn)解析

    這篇文章主要介紹了Java 創(chuàng)建兩個(gè)線(xiàn)程模擬對(duì)話(huà)并交替輸出實(shí)現(xiàn)解析,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下
    2019-10-10
  • Java使用字節(jié)流復(fù)制文件的方法

    Java使用字節(jié)流復(fù)制文件的方法

    這篇文章主要為大家詳細(xì)介紹了Java使用字節(jié)流復(fù)制文件的方法,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2017-05-05
  • SpringBoot結(jié)合mockito測(cè)試實(shí)戰(zhàn)

    SpringBoot結(jié)合mockito測(cè)試實(shí)戰(zhàn)

    與集成測(cè)試將系統(tǒng)作為一個(gè)整體測(cè)試不同,單元測(cè)試更應(yīng)該專(zhuān)注于某個(gè)類(lèi)。所以當(dāng)被測(cè)試類(lèi)與外部類(lèi)有依賴(lài)的時(shí)候,尤其是與數(shù)據(jù)庫(kù)相關(guān)的這種費(fèi)時(shí)且有狀態(tài)的類(lèi),很難做單元測(cè)試。但好在可以通過(guò)“Mockito”這種仿真框架來(lái)模擬這些比較費(fèi)時(shí)的類(lèi),從而專(zhuān)注于測(cè)試某個(gè)類(lèi)內(nèi)部的邏輯
    2022-11-11
  • Spring Bean的生命周期詳細(xì)介紹

    Spring Bean的生命周期詳細(xì)介紹

    這篇文章主要介紹了Spring Bean的生命周期的相關(guān)資料,需要的朋友可以參考下
    2016-09-09
  • SpringBoot?SpringSecurity?JWT實(shí)現(xiàn)系統(tǒng)安全策略詳解

    SpringBoot?SpringSecurity?JWT實(shí)現(xiàn)系統(tǒng)安全策略詳解

    Spring?Security是Spring的一個(gè)核心項(xiàng)目,它是一個(gè)功能強(qiáng)大且高度可定制的認(rèn)證和訪(fǎng)問(wèn)控制框架。它提供了認(rèn)證和授權(quán)功能以及抵御常見(jiàn)的攻擊,它已經(jīng)成為保護(hù)基于spring的應(yīng)用程序的事實(shí)標(biāo)準(zhǔn)
    2022-11-11
  • 深入學(xué)習(xí)MyBatis中的參數(shù)(推薦)

    深入學(xué)習(xí)MyBatis中的參數(shù)(推薦)

    大家日常使用MyBatis經(jīng)常會(huì)遇到一些異常,想要避免參數(shù)引起的錯(cuò)誤,我們需要深入了解參數(shù)。想了解參數(shù),我們首先看MyBatis處理參數(shù)和使用參數(shù)的全部過(guò)程。下面這篇文章主要給大家介紹了MyBatis中參數(shù)的的相關(guān)資料,需要的朋友可以參考借鑒,下面來(lái)一起看看吧。
    2017-06-06

最新評(píng)論

油尖旺区| 司法| 虹口区| 汉寿县| 乌拉特中旗| 崇左市| 亳州市| 涿州市| 庐江县| 色达县| 芦山县| 德昌县| 若尔盖县| 义马市| 旌德县| 桐柏县| 枞阳县| 北海市| 长乐市| 周口市| 石泉县| 天长市| 惠安县| 绥芬河市| 米林县| 乾安县| 肃南| 靖江市| 富源县| 介休市| 岚皋县| 托克逊县| 庆城县| 周宁县| 浑源县| 齐齐哈尔市| 镇远县| 施秉县| 连山| 射洪县| 澄城县|