一,Cinder组件介绍

概念

cinder组件作用:

  • 块存储服务,为运行实例提供稳定的数据块存储服务
  • 块存储服务,提供对 volume 从创建到删除整个生命周期的管理

二,常用操作

1、Volume管理

# 卷列表查看
[root@controller ~]# cinder list
+--------------------------------------+-----------+-------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+-------+------+-------------+----------+-------------+
| 9f9022f5-1b11-447e-bc0c-d3889712120a | available | test2 | 1 | - | false | |
+--------------------------------------+-----------+-------+------+-------------+----------+-------------+ # 卷详情查看
[root@controller ~]# cinder show test2
+--------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2021-11-14T02:16:13.000000 |
| description | None |
| encrypted | False |
| id | 9f9022f5-1b11-447e-bc0c-d3889712120a |
| metadata | {} |
| migration_status | None |
| multiattach | False |
| name | test2 |
| os-vol-host-attr:host | compute@lvm#LVM |
| os-vol-mig-status-attr:migstat | None |
| os-vol-mig-status-attr:name_id | None |
| os-vol-tenant-attr:tenant_id | 386dbfcf77e444c7872e4e23d5829fcc |
| replication_status | disabled |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | available |
| updated_at | 2021-11-14T02:16:14.000000 |
| user_id | 0f217182b5af448c988f5464c706a337 |
| volume_type | None |
+--------------------------------+--------------------------------------+ # 卷创建 size只能是整数
cinder create [--name <name>, --volume-type <type>] <size(GB)>
[root@controller ~]# cinder create --name test --description 'new volume' --availability-zone nova 2
+--------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2021-11-14T02:54:52.000000 |
| description | new volume |
| encrypted | False |
| id | 8190367e-4874-4e5e-86f7-0a3c4e2ae4cc |
| metadata | {} |
| migration_status | None |
| multiattach | False |
| name | test |
| os-vol-host-attr:host | None |
| os-vol-mig-status-attr:migstat | None |
| os-vol-mig-status-attr:name_id | None |
| os-vol-tenant-attr:tenant_id | 386dbfcf77e444c7872e4e23d5829fcc |
| replication_status | disabled |
| size | 2 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| updated_at | None |
| user_id | 0f217182b5af448c988f5464c706a337 |
| volume_type | None |
+--------------------------------+--------------------------------------+ # 卷删除
cinder delete <volume>
[root@controller ~]# cinder delete test
Request to delete volume test has been accepted. # 卷更新
# (1)重命名
cinder rename <volume> <name>
[root@controller ~]# cinder rename test test-volume-01
[root@controller ~]# cinder list
+--------------------------------------+-----------+----------------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+----------------+------+-------------+----------+-------------+
| 5b117210-9f6e-4d2c-94f4-66c2e3953584 | available | test-volume-01 | 2 | - | false | |
+--------------------------------------+-----------+----------------+------+-------------+----------+-------------+ # (2)修改状态
# 可修改的状态:"available", "error", "creating", "deleting", "in-use", "attaching", "detaching", "error_deleting" and "maintenance".
# 附加状态:"attached" , "detached". 默认状态为:None.
cinder reset-state [--state <state>,--attach-status <attach-status>,--reset-migration-status] <volume>
[root@controller ~]# cinder reset-state --state deleting test-volume-01
[root@controller ~]# cinder list
+--------------------------------------+----------+----------------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+----------+----------------+------+-------------+----------+-------------+
| 5b117210-9f6e-4d2c-94f4-66c2e3953584 | deleting | test-volume-01 | 2 | - | false | |
+--------------------------------------+----------+----------------+------+-------------+----------+-------------+ # (3)修改类型
# 注意:改状态卷状态必须是available状态
cinder retype <volume> <volume_type>
# a.修改卷状态为available
[root@controller ~]# cinder reset-state --state available test-volume-01
# b.查看(创建)卷类型
[root@controller ~]# cinder type-create lvm
+--------------------------------------+------+-------------+-----------+
| ID | Name | Description | Is_Public |
+--------------------------------------+------+-------------+-----------+
| b16ab5aa-f9d2-4402-89a8-1a72e9c51914 | lvm | - | True |
+--------------------------------------+------+-------------+-----------+ [root@controller ~]# cinder type-list
+--------------------------------------+------+-------------+-----------+
| ID | Name | Description | Is_Public |
+--------------------------------------+------+-------------+-----------+
| 5780bda0-0ac4-4f5a-a8c4-807980c28aaa | 性能 | | True |
| b16ab5aa-f9d2-4402-89a8-1a72e9c51914 | lvm | - | True |
+--------------------------------------+------+-------------+-----------+
# c.修改为对应的类型
[root@controller ~]# cinder retype test-volume-01 5780bda0-0ac4-4f5a-a8c4-807980c28aaa
[root@controller ~]# cinder show test-volume-01
+--------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2021-11-14T02:56:04.000000 |
| description | new volume |
| encrypted | False |
| id | 5b117210-9f6e-4d2c-94f4-66c2e3953584 |
| metadata | {} |
| migration_status | None |
| multiattach | False |
| name | test-volume-01 |
| os-vol-host-attr:host | compute@lvm#LVM |
| os-vol-mig-status-attr:migstat | None |
| os-vol-mig-status-attr:name_id | None |
| os-vol-tenant-attr:tenant_id | 386dbfcf77e444c7872e4e23d5829fcc |
| replication_status | disabled |
| size | 2 |
| snapshot_id | None |
| source_volid | None |
| status | available |
| updated_at | 2021-11-14T03:00:07.000000 |
| user_id | 0f217182b5af448c988f5464c706a337 |
| volume_type | 性能 |
+--------------------------------+--------------------------------------+ # (4)扩容
# 注意:可以从小改大,但是不可以从大改小。
# 注意:卷大小只能设置为整数值。
cinder extend <volume> <new size>
[root@controller ~]# cinder extend test-volume-01 5
[root@controller ~]# cinder list
+--------------------------------------+-----------+----------------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+----------------+------+-------------+----------+-------------+
| 5b117210-9f6e-4d2c-94f4-66c2e3953584 | available | test-volume-01 | 5 | 性能 | false | |
+--------------------------------------+-----------+----------------+------+-------------+----------+-------------+ # (5)迁移
# 迁移一个卷到特定的主机,在请求体中指定 os-migrate_volume action。
# 一般不推荐对处于in-use状态,且挂载在多个虚机上的卷进行迁移。
# 默认只有管理员用户有迁移的权限,但是可以通过policy.json文件进行权限的设置。
cinder migrate <volume> <host>

2、Type管理

    type-create         Creates a volume type.   # 类型创建
type-default List the default volume type.
type-delete Deletes a volume type. # 类型删除
type-key Sets or unsets extra_spec for a volume type.
type-list Lists available 'volume types'. (Admin only will see private types) # 类型列表查看
type-show Show volume type details. # 类型详情查看
type-update Updates volume type name, description, and/or is_public. # 类型更新 # 查看类型
cinder type-list
[root@controller ~]# cinder type-list
+--------------------------------------+------+-------------+-----------+
| ID | Name | Description | Is_Public |
+--------------------------------------+------+-------------+-----------+
| 5780bda0-0ac4-4f5a-a8c4-807980c28aaa | 性能 | | True |
| b16ab5aa-f9d2-4402-89a8-1a72e9c51914 | lvm | - | True |
+--------------------------------------+------+-------------+-----------+ # 创建类型
cinder type-create [ --description <description>, --is-public <is-public>] <name>
Positional arguments:
<name> Name of new volume type. Optional arguments:
--description <description>
Description of new volume type.
--is-public <is-public>
Make type accessible to the public (default true). [root@controller ~]# cinder type-create sata-hb-project
+--------------------------------------+-----------------+-------------+-----------+
| ID | Name | Description | Is_Public |
+--------------------------------------+-----------------+-------------+-----------+
| ac57dcb7-d157-419f-bd63-3ea0eb6ff940 | sata-hb-project | - | True |
+--------------------------------------+-----------------+-------------+-----------+ # 删除类型
# 注意:必须使用卷类型的id
cinder type-delete <type_id>
[root@controller ~]# cinder type-delete lvm
ERROR: Volume type lvm could not be found. (HTTP 404) (Request-ID: req-6144d4f5-61ee-4b83-b45d-f11ac54b8229)
[root@controller ~]# cinder type-delete ac57dcb7-d157-419f-bd63-3ea0eb6ff940
[root@controller ~]# cinder type-list
+--------------------------------------+------+-------------+-----------+
| ID | Name | Description | Is_Public |
+--------------------------------------+------+-------------+-----------+
| 5780bda0-0ac4-4f5a-a8c4-807980c28aaa | 性能 | | True |
| b16ab5aa-f9d2-4402-89a8-1a72e9c51914 | lvm | - | True |
+--------------------------------------+------+-------------+-----------+ # 修改类型
cinder type-update [--name <name>,--description <description>,--is-public <is-public>] <type_id>
[root@controller ~]# cinder type-update b16ab5aa-f9d2-4402-89a8-1a72e9c51914 --name ssd --description 'best of all'
+--------------------------------------+------+-------------+-----------+
| ID | Name | Description | Is_Public |
+--------------------------------------+------+-------------+-----------+
| b16ab5aa-f9d2-4402-89a8-1a72e9c51914 | ssd | best of all | False |
+--------------------------------------+------+-------------+-----------+

3、Snapshot管理

cinder
snapshot-create #Creates a snapshot.
snapshot-delete #Removes one or more snapshots.
snapshot-list #Lists all snapshots.
snapshot-show #Shows snapshot details.
snapshot-rename #Renames a snapshot.
snapshot-reset-state #Explicitly updates the snapshot state.
snapshot-manage #Manage an existing snapshot.
snapshot-unmanage #Stop managing a snapshot.
snapshot-metadata #Sets or deletes snapshot metadata.
snapshot-metadata-show #Shows snapshot metadata.
snapshot-metadata-update-all #Updates snapshot metadata. # 创建快照
cinder snapshot-create [--name <name>,--force [<True|False>],--description <description>,--metadata [<key=value> [<key=value> ...]]] <volume>
[root@controller keystone]# cinder snapshot-create --name snapshot-01 --description 'test snapshot of a volume' 92ad953c-a7a1-4ef7-8929-85835143cb26
+-------------+--------------------------------------+
| Property | Value |
+-------------+--------------------------------------+
| created_at | 2021-11-04T15:17:24.382623 |
| description | test snapshot of a volume |
| id | b360d2c0-9a32-4d5b-afe3-112f6cd0e215 |
| metadata | {} |
| name | snapshot-01 |
| size | 2 |
| status | creating |
| updated_at | None |
| volume_id | 92ad953c-a7a1-4ef7-8929-85835143cb26 |
+-------------+--------------------------------------+ # 查看快照列表
cinder snapshot-list
[root@controller keystone]# cinder snapshot-list
+--------------------------------------+--------------------------------------+-----------+-------------+------+
| ID | Volume ID | Status | Name | Size |
+--------------------------------------+--------------------------------------+-----------+-------------+------+
| b360d2c0-9a32-4d5b-afe3-112f6cd0e215 | 92ad953c-a7a1-4ef7-8929-85835143cb26 | available | snapshot-01 | 2 |
+--------------------------------------+--------------------------------------+-----------+-------------+------+ # 查看快照详情
cinder snapshot-show <snapshot>
[root@controller keystone]# cinder snapshot-show snapshot-01
+--------------------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------------------+--------------------------------------+
| created_at | 2021-11-04T15:17:24.000000 |
| description | test snapshot of a volume |
| id | b360d2c0-9a32-4d5b-afe3-112f6cd0e215 |
| metadata | {} |
| name | snapshot-01 |
| os-extended-snapshot-attributes:progress | 100% |
| os-extended-snapshot-attributes:project_id | 386dbfcf77e444c7872e4e23d5829fcc |
| size | 2 |
| status | available |
| updated_at | 2021-11-04T15:17:24.000000 |
| volume_id | 92ad953c-a7a1-4ef7-8929-85835143cb26 |
+--------------------------------------------+--------------------------------------+ # 删除快照
cinder snapshot-delete <snapshot>
[root@controller keystone]# cinder snapshot-delete snapshot-01
[root@controller keystone]# cinder snapshot-list
+----+-----------+--------+------+------+
| ID | Volume ID | Status | Name | Size |
+----+-----------+--------+------+------+
+----+-----------+--------+------+------+ # 快照改名
cinder snapshot-rename [--description <description>] <snapshot> [<name>]
[root@controller keystone]# cinder snapshot-rename --description 'You Have Only One Life' snapshot-01 new-test-snapshot
[root@controller keystone]# cinder snapshot-show snapshot-01
ERROR: No snapshot with a name or ID of 'snapshot-01' exists.
[root@controller keystone]# cinder snapshot-show new-test-snapshot
+--------------------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------------------+--------------------------------------+
| created_at | 2021-11-04T15:19:39.000000 |
| description | You Have Only One Life |
| id | a54e8e02-911c-482f-bc49-fac2060ad7c3 |
| metadata | {} |
| name | new-test-snapshot |
| os-extended-snapshot-attributes:progress | 100% |
| os-extended-snapshot-attributes:project_id | 386dbfcf77e444c7872e4e23d5829fcc |
| size | 2 |
| status | available |
| updated_at | 2021-11-04T15:36:26.000000 |
| volume_id | 92ad953c-a7a1-4ef7-8929-85835143cb26 |
+--------------------------------------------+--------------------------------------+ # 更新快照状态
# 可更新的状态:"available", "error", "creating", "deleting", and "error_deleting".
cinder snapshot-reset-state [--state <state>] <snapshot> [<snapshot> ...]
[root@controller keystone]# cinder snapshot-reset-state --state error new-test-snapshot
[root@controller keystone]# cinder snapshot-show new-test-snapshot
+--------------------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------------------+--------------------------------------+
| created_at | 2021-11-04T15:19:39.000000 |
| description | You Have Only One Life |
| id | a54e8e02-911c-482f-bc49-fac2060ad7c3 |
| metadata | {} |
| name | new-test-snapshot |
| os-extended-snapshot-attributes:progress | 100% |
| os-extended-snapshot-attributes:project_id | 386dbfcf77e444c7872e4e23d5829fcc |
| size | 2 |
| status | error |
| updated_at | 2021-11-04T15:39:40.000000 |
| volume_id | 92ad953c-a7a1-4ef7-8929-85835143cb26 |
+--------------------------------------------+--------------------------------------+ # 管理快照
cinder snapshot-manage [--id-type <id-type>,--name <name>,--description <description>,] [--name <name>,--metadata [<key=value> [<key=value> ...]]] <volume> <identifier>
[root@controller keystone]# cinder snapshot-manage test2 new-test-snapshot
+--------------------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------------------+--------------------------------------+
| created_at | 2021-11-04T15:46:23.000000 |
| description | None |
| id | 26efb6e5-ff02-47c0-bb1c-6a36718bd68a |
| metadata | {} |
| name | None |
| os-extended-snapshot-attributes:progress | 0% |
| os-extended-snapshot-attributes:project_id | 386dbfcf77e444c7872e4e23d5829fcc |
| size | 2 |
| status | creating |
| updated_at | None |
| volume_id | 456a40c6-65c4-41ee-9958-63bae91ec189 |
+--------------------------------------------+--------------------------------------+ # 停止管理快照
[root@controller keystone]# cinder snapshot-unmanage 26efb6e5-ff02-47c0-bb1c-6a36718bd68a
[root@controller keystone]# cinder snapshot-list
+--------------------------------------+--------------------------------------+-----------+-------------------+------+
| ID | Volume ID | Status | Name | Size |
+--------------------------------------+--------------------------------------+-----------+-------------------+------+
| a54e8e02-911c-482f-bc49-fac2060ad7c3 | 92ad953c-a7a1-4ef7-8929-85835143cb26 | available | new-test-snapshot | 2 |
+--------------------------------------+--------------------------------------+-----------+-------------------+------+ # 设置或删除快照的meta数据
cinder snapshot-metadata <snapshot> <action> <key=value> [<key=value> ...]
Positional arguments:
<snapshot> ID of snapshot for which to update metadata.
<action> The action. Valid values are "set" or "unset."
<key=value> Metadata key and value pair to set or unset. For unset, specify
only the key.
# 设置快照meta
[root@controller keystone]# cinder snapshot-metadata a54e8e02-911c-482f-bc49-fac2060ad7c3 set function='Backup data'
+----------+-------------+
| Property | Value |
+----------+-------------+
| function | Backup data |
+----------+-------------+
[root@controller keystone]# cinder snapshot-metadata a54e8e02-911c-482f-bc49-fac2060ad7c3 set update-date='2022-1-1'
+-------------+-------------+
| Property | Value |
+-------------+-------------+
| function | Backup data |
| update-date | 2022-1-1 |
+-------------+-------------+
# 删除快照meta
[root@controller keystone]# cinder snapshot-metadata a54e8e02-911c-482f-bc49-fac2060ad7c3 unset update-date='2021-11-24'
[root@controller keystone]# cinder snapshot-metadata-show a54e8e02-911c-482f-bc49-fac2060ad7c3
+-------------------+-------------+
| Metadata-property | Value |
+-------------------+-------------+
| function | Backup data |
+-------------------+-------------+ # 查看快照meta数据
[root@controller keystone]# cinder snapshot-metadata-show a54e8e02-911c-482f-bc49-fac2060ad7c3
+-------------------+-------------+
| Metadata-property | Value |
+-------------------+-------------+
| function | Backup data |
| update-date | 2021-11-24 |
+-------------------+-------------+ # 更新快照meta数据
cinder snapshot-metadata-update-all <snapshot> <key=value> [<key=value> ...]
[root@controller keystone]# cinder snapshot-metadata-update-all a54e8e02-911c-482f-bc49-fac2060ad7c3 create-date='2021-11-1 12:00:11' update-date='2021/11/24 17:24:15' function='tank T-54'
+----------+------------------------------------------------------------------------------------------------------------+
| Property | Value |
+----------+------------------------------------------------------------------------------------------------------------+
| metadata | {u'function': u'tank T-54', u'update-date': u'2021/11/24 17:24:15', u'create-date': u'2021-11-1 12:00:11'} |
+----------+------------------------------------------------------------------------------------------------------------+
[root@controller keystone]# cinder snapshot-metadata-show a54e8e02-911c-482f-bc49-fac2060ad7c3
+-------------------+---------------------+
| Metadata-property | Value |
+-------------------+---------------------+
| create-date | 2021-11-1 12:00:11 |
| function | tank T-54 |
| update-date | 2021/11/24 17:24:15 |
+-------------------+---------------------+

4、Backup管理

# 开启卷备份服务
systemctl restart openstack-cinder-backup # 查看备份列表
cinder backup-list # 查看备份详情
cinder backup-show <backup> # 创建备份
cinder backup-create --name <name> [--container <container>] <volume> # 删除备份
cinder backup-delete <backup> # 恢复备份
cinder backup-restore [--volume <volume>] <backup> # 备份导出
cinder backup-export <backup> # 备份导入
cinder backup-import <backup_service> <backup_url>

openstack中Cinder组件简解的更多相关文章

  1. openstack中Nova组件简解

    一.Nova组件概述 计算节点通过Nova Computer进行虚拟机创建,通过libvirt调用kvm创建虚拟机,nova之间通信通过rabbitMQ队列进行通信. Nova位于Openstack架 ...

  2. openstack中Neutron组件简解

    一.Neutron概述 Neutron 的设计目标是实现"网络即服务(Networking as a Service)".为了达到这一目标,在设计上遵循了基于 SDN 实现网络虚拟 ...

  3. openstack中Keystone组件简解

    一.Keystone服务概述 在Openstack框架中,keystone(Openstack Identity Service)的功能是负责验证身份.校验服务规则和发布服务令牌的,它实现了Opens ...

  4. openstack中Glance组件简解

    一.Glance组件介绍 1.概念 Glance是OpenStack镜像服务,用来注册.登陆和检索虚拟机镜像.Glance服务提供了一个REST API,使你能够查询虚拟机镜像元数据和检索的实际镜像. ...

  5. Android中Intent组件详解

    Intent是不同组件之间相互通讯的纽带,封装了不同组件之间通讯的条件.Intent本身是定义为一个类别(Class),一个Intent对象表达一个目的(Goal)或期望(Expectation),叙 ...

  6. Java中日志组件详解

    avalon-logkit Java中日志组件详解 lanhy 发布于 2020-9-1 11:35 224浏览 0收藏 作为开发人员,我相信您对日志记录工具并不陌生. Java还具有功能强大且功能强 ...

  7. Cinder 组件详解 - 每天5分钟玩转 OpenStack(47)

    本节我们将详细讲解 Cinder 的各个子服务. cinder-api cinder-api 是整个 Cinder 组件的门户,所有 cinder 的请求都首先由 nova-api 处理.cinder ...

  8. OpenStack的Trove组件详解

    一:简介     一.背景 1. 对于公有云计算平台来说,只有计算.网络与存储这三大服务往往是不太够的,在目前互联网应用百花齐放的背景下,几乎所有应用都使用到数据库,而数据库承载的往往是应用最核心的数 ...

  9. O047、 Cinder 组件详解

    参考https://www.cnblogs.com/CloudMan6/p/5585637.html   cinder-api   cinder-api 是整个Cinder 组件的门户,所有cinde ...

随机推荐

  1. 基于thinkphp6 layui的优秀极速后台开发框架推荐

    很多时候我们在做项目开发的时候,苦于没有好一点的轮子,自己动手开发的话,太耗费时间了,如果采用VUE的话,学习成本跟调试也比较麻烦, 而且有时候选用的东西甲方也不太容易接受,现在给大家介绍一款优秀的极 ...

  2. UiPath官方视频Level2

    [UiPath官方视频Level2]Lesson Orchestrator-第5部分 https://www.bilibili.com/video/av81414017 [UiPath官方视频Leve ...

  3. 使用MySqlBulkLoader批量插入数据

    最近在项目中遇到插入几万.几十万.几百万的数据到MYSQL数据库,使用EF插入会发现插入速度非常慢的场景, 数据量非常大时EF插入需要几十分钟,甚至几个小时,这样子的速度肯定不是我们所期望的. 后面经 ...

  4. NC16663 [NOIP2004]合并果子

    NC16663 [NOIP2004]合并果子 题目 题目描述 ​ 在一个果园里,多多已经将所有的果子打了下来,而且按果子的不同种类分成了不同的堆.多多决定把所有的果子合成一堆. ​ 每一次合并,多多可 ...

  5. C++简单工厂模式的学习

    我们先从最常见的C++类的一个实现开始说起, class API { public: virtual test(std::string s)=0; protected: API(){}; }; cla ...

  6. Java 常用Set集合和常用Map集合

    目录 常用Set集合 Set集合的特点 HashSet 创建对象 常用方法 遍历 常用Map集合 Map集合的概述 HashMap 创建对象 常用方法 遍历 HashMap的key去重原理 常用Set ...

  7. eclipse调用MySQL数据库的方法

    今天来总结一下使用如何使用eclipse调用MySQL数据库的数据. 一.设置eclipse 我们首先来设置一下eclipse. 在下部的Servers中右键选择new,选择server 之后在新弹出 ...

  8. Kubernetes组件介绍

    一.api-server   基本概念 该端口默认值为6443,可通过启动参数"--secure-port"的值来修改默认值. 默认IP地址为非本地(Non-Localhost)网 ...

  9. ajax01_基础知识

    ajax请求 ajax概述 组成:asynchronous + javascript + xml 特点: 可发送异步请求(这也是与传统请求方式的区别) 用javascript语言编写代码 前后端数据交 ...

  10. Class对象共嫩

    需求:写一个"框架",不能改变该类的任何代码的前提下,可以帮我们创建任意类的对象,并且执行其中任意方法 实现: 1.配置文件 2.反射 步骤: 1.将需要创建的对象的全类名和需要执 ...