当前位置: 首页 > news >正文

树莓派部署harbor_arm64

文章目录

  • 树莓派4b部署Harbor-arm64版本
          • docker-compose维护命令
          • 访问harbor 192.168.1.111认用户名密码admin/Harbor12345

树莓派4b部署Harbor-arm64版本

harbor-arm版本

部署:参考

wget https://github.com/hzliangbin/harbor-arm64/releases/download/v1.9.3/harbor-offline-installer-v1.9.3.tgz
tar -xf harbor-offline-installer-v1.9.3.tgz -C /opt/
cp /opt/harbor/harbor.yml.tmpl /opt/harbor/harbor.yml
修改/opt/harbor/harbor.yml中的hostname字段为实际ip地址或者域名
注释掉https related config模块(本地环境可以直接使用http)
docker load -i /opt/harbor/harbor.v1.9.3.tar.gz
bash /opt/harbor/prepare
bash /opt/harbor/install.sh
docker-compose维护命令
cd /opt/harbor/
启动harbor: docker-compose up -d
停止harbor:  docker-compose stop
重启harbor: docker-compose restart
查看harbor状态: docker-compose ps

异常:
docker-compose harbor harbor-log 报错:Authentication token manipulation error启动报错现象

docker-copmose up -d 后 harbor-log 无限重启

查看 harbor-log日志

docker logs -f harbor-logsudo: unable to change expired password: Authentication token manipulation error
sudo: Account or password is expired, reset your password and try again
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
Changing password for root.

解决方法:

1.以tar形式导出容器

mkdir -p /tmp/harbor-log
cd /tmp/harbor-log
docker export harbor-log -o harbor-log.tar

2.解压tar包,修改shadow中的权限(有想深入了解的可以百度“关于/etc/shadow 文件”)

# 解压tar包
tar xvfp harbor-log.tar# 修改shadow文件的值
sed -i 's/:90:/:99999:/g' /tmp/harbor-log/etc/shadow

3.将修改后的shadow文件挂载到harbor-log容器内

mkdir  /root/data/harbor/harbor-log-etccp /tmp/harbor-log/etc/shadow /root/data/harbor/harbor-log-etc/shadow

4.修改docker-compose.yml中harbor-log容器volumes配置,增加如下内容

- type: bindsource: ./harbor-log-etc/shadowtarget: /etc/shadow

5.重新启动harbor

docker-compose down
docker-compose up -d

#1 外置数据库部署访问(本次部署仅测试使用,生产环境建议高可用方式部署)

192.168.1.111: redis、postgresql
#redis
mkdir -p /opt/redis/conf/
cat << EOF > /opt/redis/conf/redis.conf
#bind 127.0.0.1
protected-mode no appendonly yes
requirepass duan@1994
EOFdocker run -itd --restart=always -p 6379:6379 --name redis-server -v /opt/redis/conf:/usr/local/etc/redis -v /data/redis/data:/data -d redis:6.0.10 redis-server /usr/local/etc/redis/redis.conf#postgresql
docker run -itd --restart=always -p 5432:5432 --name postgresql -v /data/postgresql/data:/var/lib/postgresql/data -e POSTGRES_PASSWORD=duan@1994 postgres:13.1登录pgsql创建用户和数据库
docker exec -it postgresql bash
create user harbor with password 'harborDB';
create database harbor;
create database harbor_clair;
create database harbor_notary_server;
create database harbor_notary_signer;
GRANT ALL PRIVILEGES ON DATABASE harbor to harbor;
GRANT ALL PRIVILEGES ON DATABASE harbor_clair to harbor;
GRANT ALL PRIVILEGES ON DATABASE harbor_notary_server to harbor;
GRANT ALL PRIVILEGES ON DATABASE harbor_notary_signer to harbor;

#2 部署minio(本次部署仅测试使用,生产环境建议高可用方式部署)

 sudo docker run -d -p 11000:9000 -p 11001:9090 --net=host --name minio -e "MINIO_ACCESS_KEY=minioadmin" -e "MINIO_SECRET_KEY=minioadmin@131008" -v /media/pi/Elements/minio/data:/data -v /media/pi/Elements/minio/config:/root/.minio minio/minio server /data --console-address ":11001" -address ":11000"

#3 配置harbor.yaml

# Configuration file of Harbor# The IP address or hostname to access admin UI and registry service.
# DO NOT use localhost or 127.0.0.1, because Harbor needs to be accessed by external clients.
hostname: 192.168.86.5# http related config
http:# port for http, default is 80. If https enabled, this port will redirect to https portport: 80# https related config
#https:
#  # https port for harbor, default is 443
#  port: 443
#  # The path of cert and key files for nginx
#  certificate: /your/certificate/path
#  private_key: /your/private/key/path# # Uncomment following will enable tls communication between all harbor components
# internal_tls:
#   # set enabled to true means internal tls is enabled
#   enabled: true
#   # put your cert and key files on dir
#   dir: /etc/harbor/tls/internal# Uncomment external_url if you want to enable external proxy
# And when it enabled the hostname will no longer used
# external_url: https://reg.mydomain.com:8433# The initial password of Harbor admin
# It only works in first time to install harbor
# Remember Change the admin password from UI after launching Harbor.
harbor_admin_password: Harbor12345# Harbor DB configuration
database:# The password for the root user of Harbor DB. Change this before any production use.password: root123# The maximum number of connections in the idle connection pool. If it <=0, no idle connections are retained.max_idle_conns: 50# The maximum number of open connections to the database. If it <= 0, then there is no limit on the number of open connections.# Note: the default number of connections is 1024 for postgres of harbor.max_open_conns: 1000# The default data volume
data_volume: /data# Harbor Storage settings by default is using /data dir on local filesystem
# Uncomment storage_service setting If you want to using external storage
# storage_service:
#   # ca_bundle is the path to the custom root ca certificate, which will be injected into the truststore
#   # of registry's and chart repository's containers.  This is usually needed when the user hosts a internal storage with self signed certificate.
#   ca_bundle:#   # storage backend, default is filesystem, options include filesystem, azure, gcs, s3, swift and oss
#   # for more info about this configuration please refer https://docs.docker.com/registry/configuration/
#   filesystem:
#     maxthreads: 100
#   # set disable to true when you want to disable registry redirect
#   redirect:
#     disabled: false
storage_service:s3:accesskey: adminsecretkey: admin123456region: us-east-1regionendpoint: http://192.168.86.6:9000(新版本用9001)bucket: harbor-registryencrypt: falsesecure: falsev4auth: truechunksize: 5242880rootdirectory: /# Clair configuration
clair:# The interval of clair updaters, the unit is hour, set to 0 to disable the updaters.updaters_interval: 12# Trivy configuration
#
# Trivy DB contains vulnerability information from NVD, Red Hat, and many other upstream vulnerability databases.
# It is downloaded by Trivy from the GitHub release page https://github.com/aquasecurity/trivy-db/releases and cached
# in the local file system. In addition, the database contains the update timestamp so Trivy can detect whether it
# should download a newer version from the Internet or use the cached one. Currently, the database is updated every
# 12 hours and published as a new release to GitHub.
trivy:# ignoreUnfixed The flag to display only fixed vulnerabilitiesignore_unfixed: false# skipUpdate The flag to enable or disable Trivy DB downloads from GitHub## You might want to enable this flag in test or CI/CD environments to avoid GitHub rate limiting issues.# If the flag is enabled you have to download the `trivy-offline.tar.gz` archive manually, extract `trivy.db` and# `metadata.json` files and mount them in the `/home/scanner/.cache/trivy/db` path.skip_update: false## insecure The flag to skip verifying registry certificateinsecure: false# github_token The GitHub access token to download Trivy DB## Anonymous downloads from GitHub are subject to the limit of 60 requests per hour. Normally such rate limit is enough# for production operations. If, for any reason, it's not enough, you could increase the rate limit to 5000# requests per hour by specifying the GitHub access token. For more details on GitHub rate limiting please consult# https://developer.github.com/v3/#rate-limiting## You can create a GitHub token by following the instructions in# https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line## github_token: xxxjobservice:# Maximum number of job workers in job servicemax_job_workers: 10notification:# Maximum retry count for webhook jobwebhook_job_max_retry: 10chart:# Change the value of absolute_url to enabled can enable absolute url in chartabsolute_url: disabled# Log configurations
log:# options are debug, info, warning, error, fatallevel: info# configs for logs in local storagelocal:# Log files are rotated log_rotate_count times before being removed. If count is 0, old versions are removed rather than rotated.rotate_count: 50# Log files are rotated only if they grow bigger than log_rotate_size bytes. If size is followed by k, the size is assumed to be in kilobytes.# If the M is used, the size is in megabytes, and if G is used, the size is in gigabytes. So size 100, size 100k, size 100M and size 100G# are all valid.rotate_size: 200M# The directory on your host that store loglocation: /var/log/harbor# Uncomment following lines to enable external syslog endpoint.# external_endpoint:#   # protocol used to transmit log to external endpoint, options is tcp or udp#   protocol: tcp#   # The host of external endpoint#   host: localhost#   # Port of external endpoint#   port: 5140#This attribute is for migrator to detect the version of the .cfg file, DO NOT MODIFY!
_version: 2.0.0# Uncomment external_database if using external database.
external_database:harbor:host: 192.168.1.111port: 5432db_name: harborusername: harborpassword: harborDBssl_mode: disablemax_idle_conns: 2max_open_conns: 0clair:host: 192.168.1.111port: 5432db_name: clairusername: harborpassword: harborDBssl_mode: disablenotary_signer:host: 192.168.1.111port: 5432db_name: notary_signerusername: harborpassword: harborDBssl_mode: disablenotary_server:host: 192.168.1.111port: 5432db_name: notary_serverusername: harborpassword: harborDBssl_mode: disable# Uncomment external_redis if using external Redis server
external_redis:# support redis, redis+sentinel# host for redis: <host_redis>:<port_redis># host for redis+sentinel:#  <host_sentinel1>:<port_sentinel1>,<host_sentinel2>:<port_sentinel2>,<host_sentinel3>:<port_sentinel3>host: 192.168.1.111:6379password: duan@1994# sentinel_master_set must be set to support redis+sentinel#sentinel_master_set:# db_index 0 is for core, it's unchangeableregistry_db_index: 1jobservice_db_index: 2chartmuseum_db_index: 3clair_db_index: 4trivy_db_index: 5idle_timeout_seconds: 30# Uncomment uaa for trusting the certificate of uaa instance that is hosted via self-signed cert.
# uaa:
#   ca_file: /path/to/ca# Global proxy
# Config http proxy for components, e.g. http://my.proxy.com:3128
# Components doesn't need to connect to each others via http proxy.
# Remove component from `components` array if want disable proxy
# for it. If you want use proxy for replication, MUST enable proxy
# for core and jobservice, and set `http_proxy` and `https_proxy`.
# Add domain to the `no_proxy` field, when you want disable proxy
# for some special registry.
proxy:http_proxy:https_proxy:no_proxy:components:- core- jobservice- clair- trivy
访问harbor 192.168.1.111认用户名密码admin/Harbor12345

在这里插入图片描述

docker push 异常:

docker 在push镜像到本地registry出现的500 Internal Server Error
在这里插入图片描述

原因一:
镜像目录不符合要求:应该是两级目录以上才可以的, 如:
192.168.1.111:5000/postgres:latest  不符合要求
192.168.1.111:5000/lvyuanj/postgres:latest   符合要求

Docker push时报错:Docker denied: requested access to the resource is denied的解决办法

请遵循这两种解决方法

(1)解决方案 1:
首先,检查您的 docker hub 凭据是否输入了正确的凭据。

如果您输入的密码正确,则此错误仍然存在,请尝试注销并使用您的凭据重新登录。

对于注销使用,

docker logout

再次登录使用,

docker login

在某些情况下,此解决方案可能有效。

解决方案 2:

如果仍然如此,您在尝试解决方案 1 后仍收到此错误,您必须按照此解决方案来清除错误。

YOUR_DOCKERHUB_NAME 必须是自己harbor域名或者ip:port 例:自己私有harbor 192.168.1.111:5000

首先,登录后你必须在推送之前标记你的图像:

docker tag image_name YOUR_DOCKERHUB_NAME/image_name

然后,你必须推动它。

docker push YOUR_DOCKERHUB_NAME/image_name

完成此操作后,您将能够将 docker 镜像推送到您的存储库中,错误将消失。

再次登录使用,

docker login

在某些情况下,此解决方案可能有效。

解决方案 2:

如果仍然如此,您在尝试解决方案 1 后仍收到此错误,您必须按照此解决方案来清除错误。

YOUR_DOCKERHUB_NAME 必须是自己harbor域名或者ip:port 例:自己私有harbor 192.168.1.111:5000

首先,登录后你必须在推送之前标记你的图像:

docker tag image_name YOUR_DOCKERHUB_NAME/image_name

然后,你必须推动它。

docker push YOUR_DOCKERHUB_NAME/image_name

完成此操作后,您将能够将 docker 镜像推送到您的存储库中,错误将消失。

相关文章:

树莓派部署harbor_arm64

文章目录 树莓派4b部署Harbor-arm64版本docker-compose维护命令访问harbor 192.168.1.111认用户名密码admin/Harbor12345 树莓派4b部署Harbor-arm64版本 harbor-arm版本 部署&#xff1a;参考 wget https://github.com/hzliangbin/harbor-arm64/releases/download/v1.9.3/ha…...

Typora图床配置优化(PicGo-Core(command line) 插件 + gitee)

Typora图床配置优化&#xff08;PicGo-Core(command line) 插件 gitee&#xff09; 前言 在日常使用Typora编写markdown笔记时&#xff0c;经常需要插入图片来帮助理解和整理逻辑。然而&#xff0c;由于图片保存在本地&#xff0c;上传到网上时经常出现图片不见或错误警告的…...

开放式耳机推荐品牌:五款品质超凡机型必须选购

在这个快节奏的生活中&#xff0c;我们每个人都渴望在忙碌之余找到一片属于自己的宁静。音乐&#xff0c;作为连接心灵的桥梁&#xff0c;无疑是最为直接和有效的途径。而一款优秀的开放式耳机&#xff0c;不仅能让我们沉浸在美妙的旋律中&#xff0c;还能在保持对外界环境感知…...

【大数据面试题】31 Flink 有哪些重启方法

一步一个脚印&#xff0c;一天一道面试题 Flink 提供了几种不同的重启方法&#xff1a; 异常自动从 Checkpoint 重启: Checkpoint是Flink的另一种状态快照机制&#xff0c;它比Savepoint更为频繁&#xff0c;提供了细粒度的状态恢复点。通过配置Checkpoint&#xff0c;Flink会…...

【IDEA】Redis可视化神器

在开发过程中&#xff0c;为了方便地管理 Redis 数据库&#xff0c;我们可能会使用一些数据库可视化插件。这些插件通常可以帮助你在 IDE 中直观地查看和管理 Redis 数据库&#xff0c;包括查看键值对、执行命令、监视数据库活动等。 IDEA作为IDE界的Jenkins&#xff0c;本身自…...

深入分析 Android Activity (十一)

文章目录 深入分析 Android Activity (十一)1. Activity 的内存管理和优化1.1 内存泄漏的常见原因1.2 避免内存泄漏的方法1.3 内存泄漏检测工具 2. Activity 的配置变更处理2.1 处理配置变更2.2 保存和恢复状态2.3 使用 ViewModel 3. Activity 的测试3.1 单元测试3.2 UI 测试 4…...

go语言切片、数组去重函数SliceUnique 支持所有值是可比较类型的切片或者数组去重

我们在go语言开发的时候经常会需要对切片或者数组进行去重操作&#xff0c; 今天就给大家分享一个切片 或者数组去重的通用函数。 这里提醒大家注意go语言是严格区分数据类型的&#xff0c; 切片slice 和 数组 array是不同的数据类型&#xff0c; 不要混淆&#xff01;&#x…...

微信小程序实现计算当前位置到目的地的距离

实现方式&#xff1a;使用腾讯位置服务 微信小程序JavaScript SDK | 腾讯位置服务 1.进腾讯位置服务申请key 2.下载sdk 微信小程序JavaScript SDK | 腾讯位置服务 3.微信公众平台添加授权域名 4.代码实现计算 const qqmap require("../../utils/qqmap-wx-jssdk.min.js…...

灵动微单片机洗衣机方案——【软硬件开发支持】

RAMSUN英尚以洗衣机洗涤主驱电机为例&#xff0c;主驱电机和多电机控制首选MM32SPIN0280.灵动微电子能够提供完整的软硬件开发支持&#xff0c;目前方案已经在主流家电厂出货。 洗衣机方案 皮带洗衣机 DD直驱洗衣机 波轮洗衣机 Mini壁挂和桌面洗衣机 洗涤烘干双变频方案 热泵烘…...

EureKa是什么?

Eureka 是一个源于 Netflix 公司的开源项目&#xff0c;主要用于实现服务注册和服务发现的功能。它是构建分布式系统中的微服务架构的一个关键组件。下面是对 Eureka 的解释&#xff1a; 基本概念 Eureka 是基于 REST 的服务&#xff0c;主要用于管理微服务架构中的服务实例的…...

【数据结构】直接选择排序详解!

文章目录 1.直接选择排序 1.直接选择排序 &#x1f427; begin 有可能就是 maxi &#xff0c;所以交换的时候&#xff0c;要及时更新 maxi &#x1f34e; 直接选择排序是不稳定的&#xff0c;例如&#xff1a; 9 [9] 5 [5]&#xff0c;排序后&#xff0c;因为直接选择排序是会…...

vue3中的toRaw API

文章目录 什么是toRaw API&#xff1f;为什么需要toRaw&#xff1f;如何使用toRaw&#xff1f;实际应用场景 这两天在写项目的时候&#xff0c;发现了一个之前没用过的api&#xff0c;于是上网查了一下&#xff0c;发现这个api还是挺常用&#xff0c;所以在这记录一下 什么是t…...

接口响应断言-json

json认识JSONPath源码类学习/json串的解析拓展学习 目的&#xff1a;数据返回值校验测试 json认识 json是什么-是一种数据交换格式&#xff0c;举例平时看到的json图2&#xff0c;在使用中查看不方便&#xff0c;会有格式转化的平台&#xff0c;json格式的展示 JSON在线视图…...

全面盘点多模态融合算法及应用场景

关注作者&#xff0c;分享AI全维度知识。作者拥有10年互联网服务架构、AI产品研发经验、团队管理经验&#xff0c;同济本复旦硕博&#xff0c;复旦机器人智能实验室成员&#xff0c;阿里云认证的资深架构师&#xff0c;项目管理专业人士&#xff0c;上亿营收AI产品研发负责人 多…...

超分论文走读

codeFormer 原始动机 高度不确定性&#xff0c;模糊到高清&#xff0c;存在一对多的映射纹理细节丢失人脸身份信息丢失 模型实现 训练VQGAN 从而得到HQ码本空间作为本文的离散人脸先验。为了降低LQ-HQ映射之间的不确定性&#xff0c;我们设计尽量小的码本空间和尽量短的Code…...

Android ViewPager2 + FragmentStateAdapter 的使用以及问题

场景介绍&#xff1a;在Android业务功能开发的过程中&#xff0c;需要使用到嵌套ViewPage2实现页面切换&#xff0c;这种场景在我们的开发过程中并不少见&#xff0c;大致结构为一个activity包含一个viewPage2&#xff0c;这个viewPage2中存在一个fragment A&#xff0c;fragme…...

FPGA中的乒乓操作

为什么不直接选用一个缓存更大的FIFO而选用乒乓操作为什么乒乓操作可以实现低速处理高速数据乒乓操作适用哪些场景 一、乒乓操作结构 首先先介绍一下乒乓操作的原理&#xff0c;其结构如下&#xff1a; 输入选择单元负责将数据送到数据缓冲模块&#xff0c;然后输出选择单元负…...

gnocchi学习小结

背景 总结gnocchi 4.4版本gnocchi-metricd工作流程 入口 gnocchi.cli.metricd metricd stop after processing metric默认为0&#xff0c;调servicemanager run MetricdServiceManager __init__ 服务逻辑封装到MetricdServiceManager初始化中 主要由MetricProcessor, Met…...

【机器学习】Pandas中to_pickle()函数的介绍与机器学习中的应用

【机器学习】Pandas中to_pickle()函数的介绍和机器学习中的应用 &#x1f308; 欢迎莅临我的个人主页&#x1f448;这里是我深耕Python编程、机器学习和自然语言处理&#xff08;NLP&#xff09;领域&#xff0c;并乐于分享知识与经验的小天地&#xff01;&#x1f387; &#…...

lightning的hook顺序

结果 setup: 训练循环开始前设置数据加载器和模型。 configure_optimizers: 设置优化器和学习率调度器。 on_fit_start: 训练过程开始。 on_train_start: 训练开始。 on_train_epoch_start: 每个训练周期开始。 on_train_batch_start: 每个训练批次开始。 on_before_bac…...

RestClient

什么是RestClient RestClient 是 Elasticsearch 官方提供的 Java 低级 REST 客户端&#xff0c;它允许HTTP与Elasticsearch 集群通信&#xff0c;而无需处理 JSON 序列化/反序列化等底层细节。它是 Elasticsearch Java API 客户端的基础。 RestClient 主要特点 轻量级&#xff…...

conda相比python好处

Conda 作为 Python 的环境和包管理工具&#xff0c;相比原生 Python 生态&#xff08;如 pip 虚拟环境&#xff09;有许多独特优势&#xff0c;尤其在多项目管理、依赖处理和跨平台兼容性等方面表现更优。以下是 Conda 的核心好处&#xff1a; 一、一站式环境管理&#xff1a…...

【网络】每天掌握一个Linux命令 - iftop

在Linux系统中&#xff0c;iftop是网络管理的得力助手&#xff0c;能实时监控网络流量、连接情况等&#xff0c;帮助排查网络异常。接下来从多方面详细介绍它。 目录 【网络】每天掌握一个Linux命令 - iftop工具概述安装方式核心功能基础用法进阶操作实战案例面试题场景生产场景…...

基于距离变化能量开销动态调整的WSN低功耗拓扑控制开销算法matlab仿真

目录 1.程序功能描述 2.测试软件版本以及运行结果展示 3.核心程序 4.算法仿真参数 5.算法理论概述 6.参考文献 7.完整程序 1.程序功能描述 通过动态调整节点通信的能量开销&#xff0c;平衡网络负载&#xff0c;延长WSN生命周期。具体通过建立基于距离的能量消耗模型&am…...

C# SqlSugar:依赖注入与仓储模式实践

C# SqlSugar&#xff1a;依赖注入与仓储模式实践 在 C# 的应用开发中&#xff0c;数据库操作是必不可少的环节。为了让数据访问层更加简洁、高效且易于维护&#xff0c;许多开发者会选择成熟的 ORM&#xff08;对象关系映射&#xff09;框架&#xff0c;SqlSugar 就是其中备受…...

3-11单元格区域边界定位(End属性)学习笔记

返回一个Range 对象&#xff0c;只读。该对象代表包含源区域的区域上端下端左端右端的最后一个单元格。等同于按键 End 向上键(End(xlUp))、End向下键(End(xlDown))、End向左键(End(xlToLeft)End向右键(End(xlToRight)) 注意&#xff1a;它移动的位置必须是相连的有内容的单元格…...

DeepSeek 技术赋能无人农场协同作业:用 AI 重构农田管理 “神经网”

目录 一、引言二、DeepSeek 技术大揭秘2.1 核心架构解析2.2 关键技术剖析 三、智能农业无人农场协同作业现状3.1 发展现状概述3.2 协同作业模式介绍 四、DeepSeek 的 “农场奇妙游”4.1 数据处理与分析4.2 作物生长监测与预测4.3 病虫害防治4.4 农机协同作业调度 五、实际案例大…...

Springboot社区养老保险系统小程序

一、前言 随着我国经济迅速发展&#xff0c;人们对手机的需求越来越大&#xff0c;各种手机软件也都在被广泛应用&#xff0c;但是对于手机进行数据信息管理&#xff0c;对于手机的各种软件也是备受用户的喜爱&#xff0c;社区养老保险系统小程序被用户普遍使用&#xff0c;为方…...

深度学习习题2

1.如果增加神经网络的宽度&#xff0c;精确度会增加到一个特定阈值后&#xff0c;便开始降低。造成这一现象的可能原因是什么&#xff1f; A、即使增加卷积核的数量&#xff0c;只有少部分的核会被用作预测 B、当卷积核数量增加时&#xff0c;神经网络的预测能力会降低 C、当卷…...

【从零学习JVM|第三篇】类的生命周期(高频面试题)

前言&#xff1a; 在Java编程中&#xff0c;类的生命周期是指类从被加载到内存中开始&#xff0c;到被卸载出内存为止的整个过程。了解类的生命周期对于理解Java程序的运行机制以及性能优化非常重要。本文会深入探寻类的生命周期&#xff0c;让读者对此有深刻印象。 目录 ​…...