国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

Spring Boot Actuator詳解

這篇具有很好參考價(jià)值的文章主要介紹了Spring Boot Actuator詳解。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

Actuator簡(jiǎn)介

什么是Spring Boot Actuator?

  • Spring Boot Actuator 模塊提供了生產(chǎn)級(jí)別的功能,比如健康檢查,審計(jì)指標(biāo)收集,HTTP跟蹤等,幫助我們監(jiān)控和管理Spring Boot應(yīng)用。
  • 這個(gè)模塊是一個(gè)采集應(yīng)用內(nèi)部信息暴露給外部的模塊,上述的功能都可以通過(guò)HTTP和JMX訪問(wèn)。
  • 因?yàn)楸┞秲?nèi)部信息的特性,Actuator也可以和一些外部的應(yīng)用監(jiān)控系統(tǒng)整合(Prometheus, Graphite, DataDog等)。這些監(jiān)控系統(tǒng)提供了出色的儀表板,圖形,分析和警報(bào),可幫助你通過(guò)一個(gè)統(tǒng)一友好的界面,監(jiān)視和管理你的應(yīng)用程序。
  • Actuator使用Micrometer與這些外部應(yīng)用程序監(jiān)視系統(tǒng)集成。這樣一來(lái),只需很少的配置即可輕松集成外部的監(jiān)控系統(tǒng)。

Micrometer為Java 平臺(tái)上的性能數(shù)據(jù)收集提供了一個(gè)通用的API,應(yīng)用程序只需要使用Micrometer的通用API來(lái)收集性能指標(biāo)即可。Micrometer會(huì)負(fù)責(zé)完成與不同監(jiān)控系統(tǒng)的適配工作,這就使得切換監(jiān)控系統(tǒng)變得很容易。對(duì)比Slf4j之于Java Logger中的定位。

Endpoints介紹

Endpoints簡(jiǎn)介

Spring Boot提供了所謂endpoints(下文翻譯為端點(diǎn))用于外部系統(tǒng)應(yīng)用程序進(jìn)行訪問(wèn)和交互。
例如,/health端點(diǎn)提供了關(guān)于應(yīng)用健康情況的一些基礎(chǔ)信息。/metrics端點(diǎn)提供了一些有用的應(yīng)用程序指標(biāo)(JVM 內(nèi)存使用、系統(tǒng)CPU使用等)。

Endpoints類型

Actuator模塊本來(lái)就有的端點(diǎn)我們稱之為原生端點(diǎn)。根據(jù)端點(diǎn)的作用的話,我們大概可以分為三大類:

  • 應(yīng)用配置類: 獲取應(yīng)用程序中加載的應(yīng)用配置、環(huán)境變量、自動(dòng)化配置報(bào)告等與Spring Boot應(yīng)用密切相關(guān)的配置類信息。
  • 度量指標(biāo)類: 獲取應(yīng)用程序運(yùn)行過(guò)程中用于監(jiān)控的度量指標(biāo),比如:內(nèi)存信息、線程池信息、HTTP請(qǐng)求統(tǒng)計(jì)等。
  • 操作控制類: 提供了對(duì)應(yīng)用的關(guān)閉等操作類功能。

需要注意的就是:

  • 每一個(gè)端點(diǎn)都可以通過(guò)配置來(lái)單獨(dú)禁用或者啟動(dòng)
  • 不同于Actuator 1.x,Actuator 2.x 的大多數(shù)端點(diǎn)默認(rèn)被禁掉。 Actuator 2.x中的默認(rèn)端點(diǎn)增加了/actuator前綴。默認(rèn)暴露的兩個(gè)端點(diǎn)為/actuator/health/actuator/info

Endpoints清單

此處使用的是SpringBoot 2.2.8版本,詳情請(qǐng)查看Spring官方文件

Endpoint HTTP方法 描述
/actuator GET 查看有哪些Actuator endpoint是開放的
/actuator/auditevent GET 顯示應(yīng)用暴露的審計(jì)事件 (比如認(rèn)證進(jìn)入、訂單失敗),需要搭配Spring Security使用,示例代碼
/actuator/beans GET 查看當(dāng)前上下文中配置的所有的Bean
/actuator/conditions GET 該端點(diǎn)用來(lái)獲取應(yīng)用的自動(dòng)化配置報(bào)告,其中包括所有自動(dòng)化配置的候選項(xiàng)。同時(shí)還列出了每個(gè)候選項(xiàng)自動(dòng)化配置的各個(gè)先決條件是否滿足。所以,該端點(diǎn)可以幫助我們方便的找到一些自動(dòng)化配置為什么沒(méi)有生效的具體原因。
/actuator/configprops GET 查看注入帶有@ConfigurationProperties類的properties配置的屬性和值,prefix代表前綴
/actuator/env (常用) GET 該端點(diǎn)與/configprops不同,它用來(lái)獲取應(yīng)用所有可用的環(huán)境屬性報(bào)告。包括:環(huán)境變量、JVM屬性、應(yīng)用的配置配置、命令行中的參數(shù)(但是會(huì)自動(dòng)過(guò)濾掉帶有key、password、secret等關(guān)鍵字的properties的值,保護(hù)信息安全)
/actuator/flyway GET 顯示已應(yīng)用的所有Flyway數(shù)據(jù)庫(kù)遷移
/actuator/health (常用) GET 查看當(dāng)前SpringBoot運(yùn)行的健康指標(biāo),值由HealthIndicator的實(shí)現(xiàn)類提供(所以可以自定義一些健康指標(biāo)信息)
/actuator/heapdump GET 會(huì)自動(dòng)生成一個(gè)JVM的堆文件
/actuator/info GET 展示了關(guān)于應(yīng)用的一般信息,這些信息從編譯文件比如META-INF/build-info.properties或者Git文件比如git.properties或者任何環(huán)境的property中獲取。
/actuator/mappings GET 查看全部的endpoint(包含 Actuator 的),即路徑列表
/actuator/metrics(常用) GET 查看有哪些指標(biāo)可以看(ex: jvm.memory.max、system.cpu.usage),使用/actuator/metrics/{metric.name}可以查看各指標(biāo)的詳細(xì)信息
/actuator/scheduledtasks GET 查看定時(shí)任務(wù)的信息
/actuator/shutdown POST 唯一一個(gè)需要POST請(qǐng)求的endpoint,使應(yīng)用程序正常關(guān)閉

更多詳細(xì)的EndPoint可以查看:Spring Boot Actuator [監(jiān)控與管理]

集成 Actuator

創(chuàng)建示例項(xiàng)目

我們先創(chuàng)建一個(gè)demo應(yīng)用,可以通過(guò)Spring Initializr創(chuàng)建:
spring-boot-starter-actuator,# SpringBoot,spring boot,java,后端

引入依賴

Maven

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

Gradle

dependencies {
    compile("org.springframework.boot:spring-boot-starter-actuator")
}

端點(diǎn)配置

默認(rèn)暴露端點(diǎn)

我們可以通過(guò)以下配置,來(lái)配置通過(guò)JMX 和 HTTP 暴露的端點(diǎn)。

Property Default
management.endpoints.jmx.exposure.exclude
management.endpoints.jmx.exposure.include *
management.endpoints.web.exposure.exclude
management.endpoints.web.exposure.include info, health

考慮到安全因素,Actuator默認(rèn)只開放了/actuator/health/actuator/info這兩個(gè)endpoint,如果要開放其他endpoint,需要額外在application.properties中進(jìn)行設(shè)置。

暴露配置

① 打開所有的監(jiān)控點(diǎn)

management:
  endpoints:
    enabled-by-default: true #暴露所有端點(diǎn)信息
    web:
      exposure:
        include: '*'  #以web方式暴露(不包含shutdown)

② 開放指定的endpoint

management:
  endpoints:
    enabled-by-default: true #暴露所有端點(diǎn)信息
    web:
      exposure:
        include: beans,mappings  # 如果指定多個(gè)端點(diǎn),用","分開

③ 關(guān)閉指定的endpoint

management:
  endpoints:
    web:
      exposure:
        exclude: beans# 如果指定多個(gè)端點(diǎn),用","分開
        include: *

exclude通常會(huì)跟include一起用,就是先include了全部,然后再exclude/actuator/beans這個(gè)endpoint。
④ 開放shutdown,需額外配置

management:
  endpoints:
    shutdown:
      enabled: true

路徑配置

① 默認(rèn)情況下所有端點(diǎn)都暴露在/actuator路徑下,也可以改變/actuator的路徑,可以自定義:

management:
  endpoints:
    web:
      base-path: /monitor

設(shè)置完重啟后,原本內(nèi)建的/actuator/xxx路徑,都會(huì)變成/monitor/xxx,可以用來(lái)防止被其他人猜到。
② 支持單個(gè)endpoint路徑定義,比如將health修改成healthcheck

management:
  endpoints:
    web:
      path-mapping:
        health: healthcheck

管理端口調(diào)整

management:
  server:
    port: 11011

自定義端口,默認(rèn)跟server.port一樣,可以防止被其他人猜到

端點(diǎn)響應(yīng)緩存

對(duì)于一些不帶參數(shù)的端點(diǎn)請(qǐng)求會(huì)自動(dòng)進(jìn)行緩存,我們可以通過(guò)如下方式配置緩存時(shí)間,下面配置表示 beans端點(diǎn)的緩存時(shí)間為100s

management:
  endpoint:
    beans:
      cache:
        time-to-live: 100s

端點(diǎn)保護(hù)

如果開啟了Actuator默認(rèn)不開放的endpoints,建議一定要加上Spring Security用于endpoint保護(hù),避免重要信息泄露,必須防止未經(jīng)授權(quán)的外部訪問(wèn)。

這里我們使用Spring Security保護(hù),首先添加相關(guān)依賴:

<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-security</artifactId>
</dependency>

添加之后,我們需要定義安全校驗(yàn)規(guī)則,來(lái)覆蓋Spring Security的默認(rèn)配置。
這里給出兩個(gè)版本的模板配置:

import org.springframework.boot.actuate.autoconfigure.security.servlet.EndpointRequest;
import org.springframework.boot.actuate.context.ShutdownEndpoint;
import org.springframework.boot.autoconfigure.security.servlet.PathRequest;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;


@Configuration
public class ActuatorSecurityConfig extends WebSecurityConfigurerAdapter {

    /*
     * version1:
     * 1. 限制 '/shutdown'端點(diǎn)的訪問(wèn),只允許ACTUATOR訪問(wèn)
     * 2. 允許外部訪問(wèn)其他的端點(diǎn)
     * 3. 允許外部訪問(wèn)靜態(tài)資源
     * 4. 允許外部訪問(wèn) '/'
     * 5. 其他的訪問(wèn)需要被校驗(yàn)
     * version2:
     * 1. 限制所有端點(diǎn)的訪問(wèn),只允許ACTUATOR訪問(wèn)
     * 2. 允許外部訪問(wèn)靜態(tài)資源
     * 3. 允許外部訪問(wèn) '/'
     * 4. 其他的訪問(wèn)需要被校驗(yàn)
     */

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        // version1
//        http
//                .authorizeRequests()
//                    .requestMatchers(EndpointRequest.to(ShutdownEndpoint.class))
//                        .hasRole("ADMIN")
//                .requestMatchers(EndpointRequest.toAnyEndpoint())
//                    .permitAll()
//                .requestMatchers(PathRequest.toStaticResources().atCommonLocations())
//                    .permitAll()
//                .antMatchers("/")
//                    .permitAll()
//                .antMatchers("/**")
//                    .authenticated()
//                .and()
//                .httpBasic();

        // version2
        http
                .authorizeRequests()
                .requestMatchers(EndpointRequest.toAnyEndpoint())
                    .hasRole("ADMIN")
                .requestMatchers(PathRequest.toStaticResources().atCommonLocations())
                    .permitAll()
                .antMatchers("/")
                    .permitAll()
                .antMatchers("/**")
                    .authenticated()
                .and()
                .httpBasic();
    }
}

application.properties的相關(guān)配置如下:

# Spring Security Default user name and password
spring.security.user.name=actuator
spring.security.user.password=actuator
spring.security.user.roles=ADMIN

我們使用瀏覽器訪問(wèn)http://localhost:8080/actuator/health端點(diǎn)接口,會(huì)先彈出個(gè)登錄框,只有登錄后才能訪問(wèn)。

定制Endpoint

定制化health信息

① 配置Health顯示情況,詳細(xì)界面顯示配置

management:
    health:
      enabled: true
      show-details: always #總是顯示詳細(xì)信息??娠@示每個(gè)模塊的狀態(tài)信息

② 定制Health Endpoint
添加信息:
1)繼承 AbstractHealthIndicator 類
2)定義參數(shù) Health.Builder builder
3)向參數(shù) builder 中添加狀態(tài)及相關(guān)信息

@Component
//類名截去HealthIndicator后,為顯示時(shí)的組件名
public class MyComHealthIndicator extends AbstractHealthIndicator {
 
    //真實(shí)的檢查方法
    @Override
    protected void doHealthCheck(Health.Builder builder) throws Exception {
        // 獲取鏈接進(jìn)行測(cè)試
        Map<String, Object> map = new HashMap<>();
 
        //檢查完成
        if (1 == 1) {
            //健康
            builder.status(Status.UP);
            map.put("count", 1);
        } else {
            //不健康
            builder.status(Status.OUT_OF_SERVICE);
            map.put("err", "連接超時(shí)");
            map.put("time", 3000);
        }
 
        builder.withDetail("code", 100)
               .withDetails(map);
    }
}

定制info信息

編寫InfoContributor
1)繼承 public class ExampleInfoContributor implements InfoContributor
2)定義 Info.Builder builder 參數(shù)
3)向builder中添加參數(shù)信息

@Component
public class ExampleInfoContributor implements InfoContributor {
 
    @Override
    public void contribute(Info.Builder builder) {
        builder.withDetail("msg", "你好")
               .withDetail("hello", "uclass")
               .withDetails(Collections.singletonMap("key", "value"));
 
    }
}

定制Metrics信息

① 利用service層構(gòu)造器,在注冊(cè)中心中添加cityService.saveCity.count指標(biāo)

@Service
public class CityServiceImpl implements CityServices {
 
    @Autowired
    CityMapper cityMapper;
 
    Counter counter;
 
    //利用構(gòu)造器,在注冊(cè)中心中添加cityService.saveCity.count指標(biāo)
    public CityServiceImpl(MeterRegistry meterRegistry) {
        //指標(biāo)中心注冊(cè)新的指標(biāo)項(xiàng)
        counter = meterRegistry.counter("cityService.saveCity.count");
    }
 
    public void saveCity(City city) {
        counter.increment();
        cityMapper.insertCity(city);
    }
}

② 在配置類中新建配置,添加指標(biāo)

@ServletComponentScan(basePackages = "com.uclass.thymeleaf")
@Configuration
public class AdminWebConfig implements WebMvcConfigurer {
    @Bean
    MeterBinder queueSize(Queue queue) {
        return (registry) -> Gauge.builder("queueSize", queue::size).register(registry);
    }
}
    //利用構(gòu)造器,在注冊(cè)中心中添加cityService.saveCity.count指標(biāo)
    public CityServiceImpl(MeterRegistry meterRegistry) {
        //指標(biāo)中心注冊(cè)新的指標(biāo)項(xiàng)
        counter = meterRegistry.counter("cityService.saveCity.count");
    }

自定義新端點(diǎn)

利用 @Endpoint(id = “myservice”) 注解

  • id屬性代表新增的端點(diǎn)名稱
  • 利用@ReadOperation、@WritOperation注解,在端點(diǎn)中添加信息
@Component
@Endpoint(id = "myservice")
public class MyServiceEndPoint {
 
    @ReadOperation
    public Map getDockerInfo () {
        //端點(diǎn)的讀操作
        return Collections.singletonMap("dockerInfo", "docker start...");
    }
 
    @WriteOperation
    private void restartDocker(){
        System.out.println("docker restarted....");
    }
}

參考資料

SpringBoot 指標(biāo)監(jiān)控——Actuator
Spring boot——Actuator 詳解文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-732879.html

到了這里,關(guān)于Spring Boot Actuator詳解的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • Spring Boot自帶監(jiān)控組件—Actuator介紹

    Actuator是Spring Boot提供的應(yīng)用系統(tǒng)監(jiān)控的開源框架,它是Spring Boot體系中非常重要的組件。它可以輕松實(shí)現(xiàn)應(yīng)用程序的監(jiān)控治理,支持通過(guò)眾多REST接口、遠(yuǎn)程Shell和JMX收集應(yīng)用的運(yùn)行情況。 Actuator的核心是端點(diǎn)(Endpoint),它用來(lái)監(jiān)視、提供應(yīng)用程序的信息,Spring Boot提供的sp

    2024年02月04日
    瀏覽(23)
  • Spring Boot2.xx開啟監(jiān)控 Actuator

    Spring Boot2.xx開啟監(jiān)控 Actuator

    ? ? ? ? ? ? ? ? ? ? ? ? docker實(shí)戰(zhàn)(一):centos7 yum安裝docker docker實(shí)戰(zhàn)(二):基礎(chǔ)命令篇 docker實(shí)戰(zhàn)(三):docker網(wǎng)絡(luò)模式(超詳細(xì)) docker實(shí)戰(zhàn)(四):docker架構(gòu)原理 docker實(shí)戰(zhàn)(五):docker鏡像及倉(cāng)庫(kù)配置 docker實(shí)戰(zhàn)(六):docker 網(wǎng)絡(luò)及數(shù)據(jù)卷設(shè)置 docker實(shí)戰(zhàn)(七):docker 性質(zhì)及版本選擇 認(rèn)知升維: 道、法

    2024年02月14日
    瀏覽(31)
  • 如何解決 Spring Boot Actuator 的未授權(quán)訪問(wèn)漏洞

    如何解決 Spring Boot Actuator 的未授權(quán)訪問(wèn)漏洞

    Spring Boot Actuator ?的作用是提供了一組管理和監(jiān)控端點(diǎn),允許你查看應(yīng)用程序的運(yùn)行時(shí)信息,例如健康狀態(tài)、應(yīng)用程序信息、性能指標(biāo)等。這些端點(diǎn)對(duì)于開發(fā)、 測(cè)試 ?和運(yùn)維團(tuán)隊(duì)來(lái)說(shuō)都非常有用,可以幫助快速診斷問(wèn)題、監(jiān)控應(yīng)用程序的性能,并采取必要的措施來(lái)維護(hù)和管理

    2024年02月07日
    瀏覽(30)
  • 如何在Spring Boot中禁用Actuator端點(diǎn)安全性?

    在Spring Boot中,禁用Actuator端點(diǎn)的安全性可以通過(guò)配置來(lái)實(shí)現(xiàn)。Actuator端點(diǎn)是Spring Boot應(yīng)用程序的管理和監(jiān)控端點(diǎn),它們默認(rèn)受到Spring Security的保護(hù)。如果希望完全禁用Actuator端點(diǎn)的安全性,我們可以按照以下步驟進(jìn)行操作: 確保我們的pom.xml文件中包含了Spring Boot Starter依賴項(xiàng)。

    2024年02月04日
    瀏覽(46)
  • java Spring Boot 2 /actuator/health 返回 HTTP 404

    spring-boot-starter-actuator官方文檔 Spring Boot 包含許多附加功能,可幫助您在將應(yīng)用程序投入生產(chǎn)時(shí)監(jiān)控和管理應(yīng)用程序。您可以選擇使用 HTTP 端點(diǎn)或 JMX 來(lái)管理和監(jiān)控您的應(yīng)用程序。審核、運(yùn)行狀況和指標(biāo)收集也可以自動(dòng)應(yīng)用于您的應(yīng)用程序。 該spring-boot-actuator模塊提供了 Spri

    2024年01月18日
    瀏覽(48)
  • spring boot actuator 未授權(quán)訪問(wèn)(env泄露redis密碼)

    spring boot actuator 未授權(quán)訪問(wèn)(env泄露redis密碼)

    Actuator Actuator是Spring Boot提供的服務(wù)監(jiān)控和管理中間件,默認(rèn)配置會(huì)出現(xiàn)接口未授權(quán)訪問(wèn),部分接口會(huì)泄露網(wǎng)站流量信息和內(nèi)存信息等,使用Jolokia庫(kù)特性甚至可以遠(yuǎn)程執(zhí)行任意代碼,獲取服務(wù)器權(quán)限。 滲透過(guò)程 訪問(wèn)瀏覽器訪問(wèn)actuator 訪問(wèn)env獲取到敏感信息redis服務(wù)器地址以及

    2024年02月11日
    瀏覽(22)
  • Spring Boot 3.x 系列【34】Actuator入門案例及端點(diǎn)配置

    有道無(wú)術(shù),術(shù)尚可求,有術(shù)無(wú)道,止于術(shù)。 本系列Spring Boot版本3.0.5 源碼地址:https://gitee.com/pearl-organization/study-spring-boot3 在生產(chǎn)環(huán)境很有必要對(duì)應(yīng)用進(jìn)行 監(jiān)控、追蹤、審計(jì)、控制 ,假如數(shù)據(jù)庫(kù)突然掛了,直到客戶打電話罵娘時(shí)~ 我們才知道這回事,就很尷尬了?????? Sp

    2024年02月05日
    瀏覽(23)
  • Spring Boot應(yīng)用集成Actuator組件以后怎么自定義端點(diǎn)暴露信息

    Spring Boot應(yīng)用集成Actuator組件以后怎么自定義端點(diǎn)暴露信息

    在平時(shí)業(yè)務(wù)開發(fā)中,我們往往會(huì)在spring Boot項(xiàng)目中集成Actuator組件進(jìn)行系統(tǒng)監(jiān)控,雖然Actuator組件暴露的端點(diǎn)信息已經(jīng)足夠豐富了,但是特殊場(chǎng)景下,我們也需要自己暴露端點(diǎn)信息,此時(shí)應(yīng)該怎么操作呢? 1. 創(chuàng)建一個(gè)spring Boot項(xiàng)目,導(dǎo)入相關(guān)依賴 3. 暴露端點(diǎn) 注意: 自定義的端

    2024年02月21日
    瀏覽(19)
  • 【Spring Boot系列】- Spring Boot事務(wù)應(yīng)用詳解

    事務(wù)(Transaction)是數(shù)據(jù)庫(kù)操作最基本單元,邏輯上一組操作,要么都成功。如果有一個(gè)操作失敗。則事務(wù)操作都失?。ɑ貪L(Rollback))。 事務(wù)的四個(gè)特性(ACID): 1. 原子性(Atomicity) 一個(gè)事務(wù)(Transaction)中的所有操作,要么全部完成,要么全部不完成,不會(huì)結(jié)束在中間

    2024年02月08日
    瀏覽(25)
  • Spring Boot 注解解讀詳解

    Spring Boot提供了大量的注解來(lái)簡(jiǎn)化Spring應(yīng)用的開發(fā)。下面我們將詳細(xì)介紹一些最常用的Spring Boot注解。 1. @SpringBootApplication 這是一個(gè)復(fù)合注解,用于標(biāo)記應(yīng)用的主類。它包含了以下三個(gè)注解: @SpringBootConfiguration :等同于Spring的@Configuration,標(biāo)明該類是配置類,并會(huì)把該類作為

    2024年02月06日
    瀏覽(30)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包