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

SpringCloud中的熔斷監(jiān)控HystrixDashboard和Turbine示例詳解

 更新時(shí)間:2024年09月09日 12:25:36   作者:242030  
HystrixDashboard是用于實(shí)時(shí)監(jiān)控Hystrix性能的工具,展示請(qǐng)求響應(yīng)時(shí)間和成功率等數(shù)據(jù),本文介紹了如何配置和使用HystrixDashboard和Turbine進(jìn)行熔斷監(jiān)控,包括依賴添加、啟動(dòng)類配置和測(cè)試流程,感興趣的朋友一起看看吧

SpringCloud之熔斷監(jiān)控HystrixDashboard和Turbine

Hystrix-dashboard是一款針對(duì)Hystrix進(jìn)行實(shí)時(shí)監(jiān)控的工具,通過Hystrix Dashboard我們可以在直觀地看到各

Hystrix Command的請(qǐng)求響應(yīng)時(shí)間, 請(qǐng)求成功率等數(shù)據(jù)。但是只使用Hystrix Dashboard的話, 你只能看到單個(gè)應(yīng)

用內(nèi)的服務(wù)信息,這明顯不夠。我們需要一個(gè)工具能讓我們匯總系統(tǒng)內(nèi)多個(gè)服務(wù)的數(shù)據(jù)并顯示到Hystrix

Dashboard上,這個(gè)工具就是Turbine。

1、Hystrix Dashboard

我們?cè)谌蹟嗍纠?xiàng)目的基礎(chǔ)上更改。

1.1 添加依賴

<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.3.RELEASE</version>
        <relativePath/>
    </parent>
    <groupId>com.example</groupId>
    <artifactId>spring-cloud-consumer-hystrix-dashboard</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>spring-cloud-consumer-hystrix-dashboard</name>
    <description>spring-cloud-consumer-hystrix-dashboard</description>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
        <spring-cloud.version>Dalston.RELEASE</spring-cloud.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-feign</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-eureka</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-hystrix</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-hystrix-dashboard</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>

1.2 啟動(dòng)類

啟動(dòng)類添加啟用Hystrix Dashboard和熔斷器

package com.example;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
@EnableHystrixDashboard
@EnableCircuitBreaker
public class SpringCloudConsumerHystrixDashboardApplication {
    public static void main(String[] args) {
        SpringApplication.run(SpringCloudConsumerHystrixDashboardApplication.class, args);
    }
}

1.3 其它類

package com.example.remote;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(name= "spring-cloud-producer", fallback = HelloRemoteHystrix.class)
public interface HelloRemote {
    @RequestMapping(value = "/hello")
    public String hello(@RequestParam(value = "name") String name);
}
package com.example.remote;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
@Component
public class HelloRemoteHystrix implements HelloRemote{
    @Override
    public String hello(@RequestParam(value = "name") String name) {
        return "hello " +name+", this messge send failed ";
    }
}
package com.example.controller;
import com.example.remote.HelloRemote;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class ConsumerController {
    @Autowired
    HelloRemote helloRemote;
    @RequestMapping("/hello/{name}")
    public String index(@PathVariable("name") String name) {
        return helloRemote.hello(name);
    }
}
spring.application.name=spring-cloud-consumer-hystrix-dashboard
server.port=9003
feign.hystrix.enabled=true
eureka.client.serviceUrl.defaultZone=http://localhost:8000/eureka/

1.4 測(cè)試

啟動(dòng)工程后訪問 http://localhost:9003/hystrix,將會(huì)看到如下界面:

圖中會(huì)有一些提示:

Cluster via Turbine (default cluster): http://turbine-hostname:port/turbine.stream

Cluster via Turbine (custom cluster): http://turbine-hostname:port/turbine.stream?cluster=[clusterName]

Single Hystrix App: http://hystrix-app:port/hystrix.stream

大概意思就是如果查看默認(rèn)集群使用第一個(gè)url,查看指定集群使用第二個(gè)url,單個(gè)應(yīng)用的監(jiān)控使用最后一個(gè),我

們暫時(shí)只演示單個(gè)應(yīng)用的所以在輸入框中輸入: http://localhost:9003/hystrix.stream ,輸入之后點(diǎn)擊

monitor,進(jìn)入頁(yè)面。如果沒有請(qǐng)求會(huì)先顯示Loading ...

在這里插入圖片描述

訪問 http://localhost:9003/hystrix.stream 也會(huì)不斷的顯示ping。

在這里插入圖片描述

請(qǐng)求服務(wù) http://localhost:9003/hello/neo,就可以看到監(jiān)控的效果了:

在這里插入圖片描述

首先訪問 http://localhost:9003/hystrix.stream,顯示如下:

data: {"type":"HystrixCommand","name":"HelloRemote#hello(String)","group":"spring-cloud-producer","currentTime":1662554090588,"isCircuitBreakerOpen":false,"errorPercentage":0,"errorCount":0,"requestCount":0,"rollingCountBadRequests":0,"rollingCountCollapsedRequests":0,"rollingCountEmit":0,"rollingCountExceptionsThrown":0,"rollingCountFailure":0,"rollingCountFallbackEmit":0,"rollingCountFallbackFailure":0,"rollingCountFallbackMissing":0,"rollingCountFallbackRejection":0,"rollingCountFallbackSuccess":0,"rollingCountResponsesFromCache":0,"rollingCountSemaphoreRejected":0,"rollingCountShortCircuited":0,"rollingCountSuccess":0,"rollingCountThreadPoolRejected":0,"rollingCountTimeout":0,"currentConcurrentExecutionCount":0,"rollingMaxConcurrentExecutionCount":0,"latencyExecute_mean":0,"latencyExecute":{"0":0,"25":0,"50":0,"75":0,"90":0,"95":0,"99":0,"99.5":0,"100":0},"latencyTotal_mean":0,"latencyTotal":{"0":0,"25":0,"50":0,"75":0,"90":0,"95":0,"99":0,"99.5":0,"100":0},"propertyValue_circuitBreakerRequestVolumeThreshold":20,"propertyValue_circuitBreakerSleepWindowInMilliseconds":5000,"propertyValue_circuitBreakerErrorThresholdPercentage":50,"propertyValue_circuitBreakerForceOpen":false,"propertyValue_circuitBreakerForceClosed":false,"propertyValue_circuitBreakerEnabled":true,"propertyValue_executionIsolationStrategy":"THREAD","propertyValue_executionIsolationThreadTimeoutInMilliseconds":1000,"propertyValue_executionTimeoutInMilliseconds":1000,"propertyValue_executionIsolationThreadInterruptOnTimeout":true,"propertyValue_executionIsolationThreadPoolKeyOverride":null,"propertyValue_executionIsolationSemaphoreMaxConcurrentRequests":10,"propertyValue_fallbackIsolationSemaphoreMaxConcurrentRequests":10,"propertyValue_metricsRollingStatisticalWindowInMilliseconds":10000,"propertyValue_requestCacheEnabled":true,"propertyValue_requestLogEnabled":true,"reportingHosts":1,"threadPool":"spring-cloud-producer"}
data: {"type":"HystrixThreadPool","name":"spring-cloud-producer","currentTime":1662554090588,"currentActiveCount":0,"currentCompletedTaskCount":1,"currentCorePoolSize":10,"currentLargestPoolSize":1,"currentMaximumPoolSize":10,"currentPoolSize":1,"currentQueueSize":0,"currentTaskCount":1,"rollingCountThreadsExecuted":0,"rollingMaxActiveThreads":0,"rollingCountCommandRejections":0,"propertyValue_queueSizeRejectionThreshold":5,"propertyValue_metricsRollingStatisticalWindowInMilliseconds":10000,"reportingHosts":1}
ping: 

說明已經(jīng)返回了監(jiān)控的各項(xiàng)結(jié)果。

到監(jiān)控頁(yè)面就會(huì)顯示如下圖:

在這里插入圖片描述

其實(shí)就是 http://localhost:9003/hystrix.stream 返回結(jié)果的圖形化顯示,Hystrix Dashboard Wiki上詳細(xì)

說明了圖上每個(gè)指標(biāo)的含義,如下圖:

在這里插入圖片描述

到此單個(gè)應(yīng)用的熔斷監(jiān)控已經(jīng)完成。

2、Turbine

在復(fù)雜的分布式系統(tǒng)中,相同服務(wù)的節(jié)點(diǎn)經(jīng)常需要部署上百甚至上千個(gè),很多時(shí)候,運(yùn)維人員希望能夠把相同服務(wù)

的節(jié)點(diǎn)狀態(tài)以一個(gè)整體集群的形式展現(xiàn)出來,這樣可以更好的把握整個(gè)系統(tǒng)的狀態(tài)。 為此,Netflix提供了一個(gè)開

源項(xiàng)目(Turbine)來提供把多個(gè)hystrix.stream的內(nèi)容聚合為一個(gè)數(shù)據(jù)源供Dashboard展示。

2.1 添加依賴

<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.3.RELEASE</version>
        <relativePath/>
    </parent>
    <groupId>com.example</groupId>
    <artifactId>spring-cloud-hystrix-dashboard-turbine</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>spring-cloud-hystrix-dashboard-turbine</name>
    <description>spring-cloud-hystrix-dashboard-turbine</description>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
        <spring-cloud.version>Dalston.RELEASE</spring-cloud.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-turbine</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-netflix-turbine</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-hystrix-dashboard</artifactId>
        </dependency>
    </dependencies>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>

2.2 配置文件

spring.application.name=hystrix-dashboard-turbine
server.port=8001
turbine.appConfig=node01,node02
turbine.aggregator.clusterConfig= default
turbine.clusterNameExpression= new String("default")
eureka.client.serviceUrl.defaultZone=http://localhost:8000/eureka/
  • turbine.appConfig:配置Eureka中的serviceId列表,表明監(jiān)控哪些服務(wù)。
  • turbine.aggregator.clusterConfig:指定聚合哪些集群,多個(gè)使用”,”分割,默認(rèn)為default??墒褂?/li>

http://.../turbine.stream?cluster={clusterConfig之一}訪問。

  • turbine.clusterNameExpression

1、clusterNameExpression指定集群名稱,默認(rèn)表達(dá)式appName;此時(shí):

turbine.aggregator.clusterConfig需要配置想要監(jiān)控的應(yīng)用名稱;

2、當(dāng)clusterNameExpression: default時(shí),turbine.aggregator.clusterConfig可以不寫,因?yàn)槟J(rèn)就是

default;

3、當(dāng)clusterNameExpression: metadata[‘cluster’]時(shí),假設(shè)想要監(jiān)控的應(yīng)用配置了

eureka.instance.metadata-map.cluster: ABC,則需要配置,同時(shí)

turbine.aggregator.clusterConfig: ABC

2.3 啟動(dòng)類

啟動(dòng)類添加@EnableTurbine,激活對(duì)Turbine的支持

package com.example;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.cloud.netflix.turbine.EnableTurbine;
@SpringBootApplication
@EnableHystrixDashboard
@EnableTurbine
public class SpringCloudHystrixDashboardTurbineApplication {
	public static void main(String[] args) {
		SpringApplication.run(SpringCloudHystrixDashboardTurbineApplication.class, args);
	}
}

到此Turbine(hystrix-dashboard-turbine)配置完成

2.4 測(cè)試

在示例項(xiàng)目spring-cloud-consumer-hystrix基礎(chǔ)上修改為兩個(gè)服務(wù)的調(diào)用者spring-cloud-consumer-node1和

spring-cloud-consumer-node2。

spring-cloud-consumer-node1項(xiàng)目改動(dòng)如下:application.properties文件內(nèi)容

spring.application.name=node01
server.port=9001
feign.hystrix.enabled=true
eureka.client.serviceUrl.defaultZone=http://localhost:8000/eureka/

spring-cloud-consumer-node2項(xiàng)目改動(dòng)如下:application.properties文件內(nèi)容

spring.application.name=node02
server.port=9002
feign.hystrix.enabled=true
eureka.client.serviceUrl.defaultZone=http://localhost:8000/eureka/

HelloRemote類修改:

package com.example.remote;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(name = "spring-cloud-producer", fallback = HelloRemoteHystrix.class)
public interface HelloRemote {
    @RequestMapping(value = "/hello")
    public String hello(@RequestParam(value = "name") String name);
}

對(duì)應(yīng)的HelloRemoteHystrixConsumerController類跟隨修改,具體查看代碼

package com.example.remote;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
@Component
public class HelloRemoteHystrix implements HelloRemote{
    @Override
    public String hello(@RequestParam(value = "name") String name) {
        return "hello " +name+", this messge send failed ";
    }
}
package com.example.controller;
import com.example.remote.HelloRemote;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class ConsumerController {
    @Autowired
    HelloRemote helloRemote;
    @RequestMapping("/hello/{name}")
    public String index(@PathVariable("name") String name) {
        return helloRemote.hello(name);
    }
}

修改完畢后,依次啟動(dòng)spring-cloud-eureka、spring-cloud-consumer-node1、spring-cloud-consumer-

node2、spring-cloud-hystrix-dashboard-turbine

打開eureka后臺(tái)可以看到注冊(cè)了三個(gè)服務(wù):

在這里插入圖片描述

訪問 http://localhost:8001/turbine.stream

返回:

: ping
data: {"reportingHostsLast10Seconds":0,"name":"meta","type":"meta","timestamp":1662554703162}
: ping
data: {"reportingHostsLast10Seconds":0,"name":"meta","type":"meta","timestamp":1662554706172}

并且會(huì)不斷刷新以獲取實(shí)時(shí)的監(jiān)控?cái)?shù)據(jù),說明和單個(gè)的監(jiān)控類似,返回監(jiān)控項(xiàng)目的信息。

進(jìn)行圖形化監(jiān)控查看,輸入:http://localhost:8001/hystrix,返回酷酷的小熊界面

在這里插入圖片描述

輸入:http://localhost:8001/turbine.stream,然后點(diǎn)擊 Monitor Stream ,可以看到出現(xiàn)了倆個(gè)監(jiān)控列表

在這里插入圖片描述

訪問http://localhost:9001/hello/neohttp://localhost:9002/hello/neo

在這里插入圖片描述

到此這篇關(guān)于SpringCloud中的熔斷監(jiān)控HystrixDashboard和Turbine的文章就介紹到這了,更多相關(guān)SpringCloud熔斷監(jiān)控內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • 通過MyBatis讀取數(shù)據(jù)庫(kù)數(shù)據(jù)并提供rest接口訪問

    通過MyBatis讀取數(shù)據(jù)庫(kù)數(shù)據(jù)并提供rest接口訪問

    這篇文章主要介紹了通過MyBatis讀取數(shù)據(jù)庫(kù)數(shù)據(jù)并提供rest接口訪問 的相關(guān)資料,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下
    2016-08-08
  • springboot結(jié)合mybatis-plus快速生成項(xiàng)目模板的方法

    springboot結(jié)合mybatis-plus快速生成項(xiàng)目模板的方法

    Mybatis-Plus是一個(gè) Mybatis 的增強(qiáng)工具,在 Mybatis 的基礎(chǔ)上只做增強(qiáng)不做改變,為簡(jiǎn)化開發(fā)、提高效率而生,接下來通過本文給大家分享springboot結(jié)合mybatis-plus快速生成項(xiàng)目模板的方法,感興趣的朋友一起看看吧
    2021-06-06
  • Java編程中利用InetAddress類確定特殊IP地址的方法

    Java編程中利用InetAddress類確定特殊IP地址的方法

    這篇文章主要介紹了Java編程中利用InetAddress類確定特殊IP地址的方法,InetAddress類是Java網(wǎng)絡(luò)編程中一個(gè)相當(dāng)實(shí)用的類,需要的朋友可以參考下
    2015-11-11
  • 使用Java填充Word模板的方法詳解

    使用Java填充Word模板的方法詳解

    Java填充Word模板是一種將動(dòng)態(tài)數(shù)據(jù)插入到Word文檔模板中生成最終文檔的過程,通常用于批量創(chuàng)建包含個(gè)人信息、報(bào)告結(jié)果或其他動(dòng)態(tài)內(nèi)容的文檔,本文給大家介紹了使用Java填充Word模板的方法,需要的朋友可以參考下
    2024-07-07
  • 詳解springmvc 中controller與jsp傳值

    詳解springmvc 中controller與jsp傳值

    本篇文章主要介紹了springmvc 中controller與jsp傳值,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧
    2017-07-07
  • SpringBoot實(shí)戰(zhàn)之SSL配置詳解

    SpringBoot實(shí)戰(zhàn)之SSL配置詳解

    今天小編就為大家分享一篇關(guān)于SpringBoot實(shí)戰(zhàn)之SSL配置詳解,小編覺得內(nèi)容挺不錯(cuò)的,現(xiàn)在分享給大家,具有很好的參考價(jià)值,需要的朋友一起跟隨小編來看看吧
    2019-02-02
  • Springcloud ribbon負(fù)載均衡算法實(shí)現(xiàn)

    Springcloud ribbon負(fù)載均衡算法實(shí)現(xiàn)

    這篇文章主要介紹了Springcloud ribbon負(fù)載均衡算法實(shí)現(xiàn),文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下
    2020-04-04
  • Sentinel結(jié)合Nacos實(shí)現(xiàn)數(shù)據(jù)持久化過程詳解

    Sentinel結(jié)合Nacos實(shí)現(xiàn)數(shù)據(jù)持久化過程詳解

    這篇文章主要介紹了Sentinel結(jié)合Nacos實(shí)現(xiàn)數(shù)據(jù)持久化過程,要持久化的原因是因?yàn)槊看螁?dòng)Sentinel都會(huì)使之前配置的規(guī)則就清空了,這樣每次都要再去設(shè)定規(guī)則顯得非常的麻煩,感興趣想要詳細(xì)了解可以參考下文
    2023-05-05
  • 一篇文章徹底拆解Java?HashMap擴(kuò)容機(jī)制

    一篇文章徹底拆解Java?HashMap擴(kuò)容機(jī)制

    在Java中HashMap是一個(gè)非常常用的數(shù)據(jù)結(jié)構(gòu),基于哈希表實(shí)現(xiàn),它通過鍵值對(duì)的形式存儲(chǔ)數(shù)據(jù),這篇文章主要介紹了Java HashMap擴(kuò)容機(jī)制的相關(guān)資料,文中通過代碼介紹的非常詳細(xì),需要的朋友可以參考下
    2026-04-04
  • java中int、double、char等變量的取值范圍詳析

    java中int、double、char等變量的取值范圍詳析

    這篇文章主要給大家介紹了關(guān)于java中int、double、char等變量取值范圍的相關(guān)資料,每個(gè)變量都給出了詳細(xì)的實(shí)例代碼,對(duì)大家學(xué)習(xí)或者使用java具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下
    2021-10-10

最新評(píng)論

镇江市| 卢龙县| 岳阳市| 精河县| 望谟县| 崇阳县| 肥乡县| 十堰市| 竹北市| 清远市| 汕尾市| 甘德县| 临城县| 周至县| 千阳县| 淅川县| 崇义县| 栖霞市| 神池县| 聂拉木县| 南和县| 永吉县| 大城县| 嵩明县| 澎湖县| 贵阳市| 兴和县| 新蔡县| 汾阳市| 天峨县| 双城市| 广元市| 和田县| 望城县| 万全县| 沛县| 旺苍县| 肃南| 蓬安县| 塔城市| 临漳县|