三国志14信息查询小程序(历史武将信息一览)制作更新过程05-后台接口的编写及调用

news2024/10/1 5:27:55

1,创建ASP.NET Web API项目

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
生成完毕,项目结构如下:
在这里插入图片描述
运行看一下:
在这里插入图片描述

2,后台接口编写

(1)在Models文件夹中新建一个sandata.cs文件(就是上篇中武将信息表的model文件)
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace API.Models
{


    public  class Sandata
    {
           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:False
           /// </summary>           
           [SugarColumn(IsPrimaryKey=true)]
           public int Id {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string sex {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           public int tongshuai {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           public int wuli {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           public int zhili {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           public int zhengzhi {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           public int meili {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string zhuyi {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string zhengce {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string zhengcedengji {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string peiou {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string name {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string gexing1 {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string gexing2 {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string gexing3 {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string gexing4 {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string gexing5 {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string shengnian {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string dengchang {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string zunian {get;set;}

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string hjqy { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string fdlm { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string eyyx { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string qxgj { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string gdzz { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string sgml { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string cbzz { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string hzzdz { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string gybww { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string csb { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string ztld { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string hdlb { get; set; }


        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string hszc { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string hbys { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string cjfl { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string zzql { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string eftx { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string jmc { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string qfzh { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string yxjj { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string yxlw { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string yyyz { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string ccds { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string lbtfz { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string hbzz { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>
        public string tgzz { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>
        public string hfzz { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>
        public string ylzz { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>
        public string zfnm { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>
        public string qfwzy { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>
        public string zszb { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>
        public string shmw { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>
        public string htdl { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>
        public string hbgs { get; set; }

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:True
        /// </summary>
        public string xsbl { get; set; }




        /// <summary>
        /// alias:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string alias { get; set; }

        /// <summary>
        /// biography1:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string biography1 { get; set; }

        /// <summary>
        /// biography2:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string biography2 { get; set; }

        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string biography3 { get; set; }

        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string xiangxing { get; set; }

        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string xueyuan { get; set; }

        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string fuqin { get; set; }

        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string muqin { get; set; }

        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string shidai { get; set; }

        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string yxd { get; set; }


        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string zx { get; set; }

        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string zf { get; set; }

        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string like1 { get; set; }

        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string like2 { get; set; }

        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string like3 { get; set; }

        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string like4 { get; set; }

        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string like5 { get; set; }

        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string like6 { get; set; }

        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string like7 { get; set; }

        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string like8 { get; set; }

        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string dislike1 { get; set; }

        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string dislike2 { get; set; }

        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string dislike3 { get; set; }

        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string dislike4 { get; set; }

        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string dislike5 { get; set; }

        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string dislike6 { get; set; }

        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string dislike7 { get; set; }

        /// <summary>
        /// biography3:
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string dislike8 { get; set; }
         
        public string qingyi { get; set; }
        public string yexin { get; set; }
        public string hanchao { get; set; }
        public string haozhan { get; set; }
        public string waijiao { get; set; }
        public string wuzi { get; set; }

        public string jianshe { get; set; }
    }
}

(2)在Models文件夹中新建一个MessageModel.cs文件作为通用返回格式:
namespace API.Models
{
    /// <summary>
    /// 通用返回信息类
    /// </summary>
    public class MessageModel<T>
    {
        /// <summary>
        /// 状态码
        /// </summary>
        public int status { get; set; } = 200;
        /// <summary>
        /// 页码
        /// </summary>
        public int page { get; set; }
        /// <summary>
        /// 数据条数
        /// </summary>
        public int pageCount { get; set; }
        /// <summary>
        /// 操作是否成功
        /// </summary>
        public bool success { get; set; } = false;
        /// <summary>
        /// 返回信息
        /// </summary>
        public string msg { get; set; } = "服务器异常";
        /// <summary>
        /// 返回数据集合
        /// </summary>
        public T response { get; set; }

    }
}
(3)在Controllers文件夹里新建DataController.cs文件(新建控制器)
(4)使用sqlsugar这一款ORM框架来进行数据库操作

程序NuGet引入两个类库sqlsugar和Newtonsoft.Json
在这里插入图片描述
在这里插入图片描述

(5)Controllers文件夹下新建Helper.cs类

在这里插入图片描述
Helper.cs全部内容如下:

using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace API.Helper
{
    public class dbContext
    {
        private static SqlSugarClient _db = null;
        /// <summary>
        /// test是数据库名
        /// </summary>                                          
        public static string ConnectionString = "server=localhost;uid=xxx;pwd=xxx;database=vue_test";
        public static SqlSugarClient CretClient()
        {
            _db = new SqlSugarClient(new ConnectionConfig()
            {
                ConnectionString = ConnectionString, //数据库连接字符串
                DbType = DbType.MySql, //必填
                IsAutoCloseConnection = false, //默认false
                InitKeyType = InitKeyType.Attribute
            });
            return _db;
        }
    }
}

其中,DbType = DbType.MySql表示我们要连接的数据库为mysql,当然你也可以选择其他的数据库。或者切换多个不同的数据库(具体查看官方文档,既上面的sqlsugar),本篇中只使用一个数据库。server=localhost;uid=xxx;pwd=xxx;database=xxx为连接字符串,这是Mysql的连接字符串样式,不同的数据库是不同的,把里面的xxx换为你自己的数据库用户名,密码,使用的数据库名。

(6)打开我们之前写的DataController.cs文件添加接口方法

首先使用Helper.cs里新建的DbContext类来连接数据库

public static SqlSugarClient DbContext = dbContext.CretClient();

在这里插入图片描述
添加引用。此时,当前文件完整引用为:

using Newtonsoft.Json;
using System;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using MySql.Data.MySqlClient;
using System.Collections;
using System.Text;
using System.Threading.Tasks;
using API.Models;
using System.Collections.Generic;
using System.Web;
using SqlSugar;
using System.Diagnostics;
using System.Reflection;
using API.Helper;

然后添加接口方法,例如添加一个分页查询的方法

        /// <summary>
        /// 获取数据(分页)
        /// </summary>
        ///<param name="page">当前页数</param>
        ///<param name="intPageSize">每页显示数据条数</param>
        ///<param name="key">查询条件</param>
        public async Task<MessageModel<object>> GetAsync(int page = 1,int intPageSize=10,string key="")
        {
            Expressionable<Data> exp = Expressionable.Create<SanData>();
            if (!string.IsNullOrEmpty(key))
            {
                exp.And(it => it.Name.Contains(key));
            }
            var result = DbContext.Queryable<SanData>()
                .Where(exp.ToExpression())
                .ToPageList(page, intPageSize);
            return await Task.FromResult(new MessageModel<object>()
            {
                status = 200,
                success = true,
                msg = "获取成功",
                response = result
            });

        }

3,接口发布

(1)首先打包项目

项目上右键,选择“发布”
在这里插入图片描述
点击发布,目标位置里的app.publish文件夹就是我们后台打的包

(2)然后通过IIS发布

如果是新的服务器可能需要启用IIS服务
在这里插入图片描述

4,接口调用

注意1:接口在小程序使用之前,应保证可在外网访问。(这可在服务器平台的安全组设置以及服务器的出入口规则设置端口号来实现)
注意2:正式上线的小程序如要访问外网接口,接口必须是绑定在已经备案的域名上;并且,在小程序平台上的开发管理中,将开发设置下的服务器域名配置成你备案的域名。若是在本地微信开发者工具上访问,则先直接访问IP地址加端口号的形式也可以。

这里以获取亲爱/厌恶武将A的数据接口GetAllBeLove为例:
请求url为:BASE_URL /GetAllBeLove
参数有两个,name即武将名称,type即亲爱/厌恶

在小程序中获取数据:

         //获取亲爱武将A的数据
         let name="刘备";
         let type="like";
         let result_like = await fetchData(BASE_URL + 'GetAllBeLove', { name, type });
        //请求数据
        async function fetchData(url, data = {}) {
            return new Promise((resolve, reject) => {
                wx.request({
                    url,
                    data,
                    header: {
                       'content-type': 'application/x-www-form-urlencoded'
                    },
                    method: "GET",
                   success: resolve,
                   fail: reject
              });
       });
     }  

获取结果结构如下:
在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1180704.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

CDN策略好坏的重要性

CDN加速技术在今天的互联网世界中扮演着至关重要的角色&#xff0c;它可以显著提高网站和应用程序的性能&#xff0c;同时也有助于提供更好的安全性。然而&#xff0c;设定安全策略的好坏对CDN的影响是一个关键的议题&#xff0c;本文将深入探讨这个问题。 CDN&#xff08;内容…

易货模式:返璞归真,以物换物。

在这个全球经济一体化的时代&#xff0c;贸易就像是一条熙熙攘攘的街道&#xff0c;各种商品和服务如同川流不息的车辆&#xff0c;往来穿梭。然而&#xff0c;这条街道上的交易形式却像是一个陈旧的迷宫&#xff0c;充满了曲折和困惑。直到有一天&#xff0c;一道新的贸易形式…

三款软件录制电脑屏幕视频

在这个视频信息快速发展的新时代&#xff0c;寻找好用的可以录制电脑屏幕视频的软件变得极其重要&#xff0c;因为制作视频已成为我们生活工作中不可或缺的一部分。 这些好用的录屏软件允许你录制摄像头、特定窗口、部分区域或整个桌面&#xff0c;同时还可对录制中的视频进行…

SAP MASS增加PR字段-删除标识

MASS->BUS2105->发现没有找到PR删除标识字段 SAP MASS增加PR字段-删除标识 1.tcode:MASSOBJ 选中BUS2105 点“应用程序表” 点“字段列表” 2.选中一行进行参考 3.修改字段为删除标识 LOEKZ&#xff0c;保存即可。 4.然后MASS操作&#xff0c;批量设置删除标识&…

Magic Bullet Suite v2024.0.1

Red Giant Magic Bullet Suite是一套AE视频后期处理软件&#xff0c;适用于Premiere Pro、After Effects等视频编辑软件。它提供了多种精美的视频特效和调色工具&#xff0c;使得视频制作更加专业和出色。 Magic Bullet Suite包括多个插件&#xff0c;其中最为知名的是Magic B…

【10】c++11新特性 —>move移动语义(1)

移动语义&#xff08;Move Semantics&#xff09;是C11引入的一个重要特性&#xff0c;它允许在不复制数据的情况下将资源&#xff08;如内存、指针等&#xff09;从一个对象转移到另一个对象&#xff0c;从而可以提高程序的性能。 在C11添加了右值引用&#xff0c;并且不能使用…

Binder 原理

1. Linux 和 Binder 的 IPC 通信原理 进程通信的简单模型如下所示&#xff1a; 1.1 内核空间&#xff08;Kernel space&#xff09;和用户空间&#xff08;User space&#xff09; 操作系统从逻辑上将虚拟空间划分为用户空间和内核空间。Linux 操作系统将较高的 1GB 供内核使…

369-HI-R-M-0-0-0-E 数字化转型如何改变DCS和SCADA

369-HI-R-M-0-0-0-E 数字化转型如何改变DCS和SCADA 高瞻远瞩的过程制造商正在投资数字化转型&#xff0c;而DCS和SCADA最终将成为这些努力的一部分。因此&#xff0c;它们与所有其他流程制造技术一起发展。DCS和SCADA系统的变化符合自动化金字塔正在进行的转变&#xff0c;它也…

助力工业数字化!TDengine 与恩菲 MIM+ 工业互联网平台实现兼容性互认

在云计算、物联网、5G等新兴技术快速发展的当下&#xff0c;制造企业想要运用新兴技术实现数字化转型&#xff0c;工业互联网平台的应用和打造是非常关键的转型要素。在工业互联网平台的发展中&#xff0c;数据处理上存在的问题一直都是令企业所头疼的&#xff0c;越来越多的案…

一对一交友App开发指南:从概念到上线的完整路线图

作为现代社交方式的重要组成部分&#xff0c;一对一交友App在满足人们社交需求方面扮演着重要角色。本文将为您呈现一对一交友App的开发指南&#xff0c;从概念到上线的完整路线图&#xff0c;帮助您构建一款成功的交友平台。 概念阶段 在一对一交友App开发的初期&#xff0c…

电子电表和智能电表有什么区别?

随着科技的不断发展&#xff0c;电力计量设备也在不断更新换代。电子电表和智能电表作为两种常见的电力计量设备&#xff0c;虽然在功能和性能上有一定的相似性&#xff0c;但在原理、应用场景等方面存在显著差异。接下来&#xff0c;小编将为大家详细解析电子电表和智能电表的…

linux地址空间

地址空间 内存空间示意图虚拟地址空间虚拟地址进程地址空间生命周期图解为什么要有地址空间呢&#xff1f; 小结 内存空间示意图 进程是在内存中运行的&#xff0c;为了便于管理&#xff0c;不同的数据会存储在不同的区域&#xff0c;因此内存就被分为几部分&#xff0c;如下图…

Java中访问修饰符

类和类之间的关系有如下几种: 以Hero为例自身&#xff1a;指的是Hero自己同包子类&#xff1a;ADHero这个类是Hero的子类&#xff0c;并且和Hero处于同一个包下不同包子类&#xff1a;Support这个类是Hero的子类&#xff0c;但是在另一个包下同包类&#xff1a; GiantDragon 这…

相关性分析——Pearson相关系数+热力图(附data和Python完整代码)

相关性分析&#xff1a;指对两个或多个具有相关性的变量元素进行分析 1.散点图和相关性热力图 2.相关系数 相关系数最早是由统计学家卡尔 皮尔逊设计的统计指标&#xff0c;是研究变量之间线性相关承兑的值&#xff0c;一般用字母 r 表示。 2.1Pearson相关系数 Pearson相关…

蓝桥杯算法竞赛系列第九章·巧解哈希题,用这3种数据类型足矣

你好&#xff0c;我是安然无虞。 文章目录 哈希基础概念哈希相关题目 有效的字母异位词 赎金信 字母异位词分组 两个数组的交集 快乐数 两数之和 四数相加 II 最长连续序列 查找共用字符 同构字符串 单词规律 字节跳动面试&#xff1a;缺失的第一个正数 哈喽哈喽&#xff0c;好…

vr航空博物馆综合展馆趣味VR科普体验

第十期广州科普开放日 10月28日周六上午九点半&#xff0c;广州卓远VR科普基地再次迎来一批前来体验的亲子家庭&#xff0c;陆续到达的市民朋友让整个基地都热闹了起来&#xff0c;他们在这里开启了一场别开生面的VR科普体验。 一期一会&#xff0c;趣味VR科普 10月广州科普开放…

Pinia 是什么?Redux、Vuex、Pinia 的区别?

结论先行&#xff1a; Pinia 是 Vue 官方团队开发的一个全新状态管理库。与 Redux、Vuex 相同&#xff0c;核心都是解决组件间的通信和数据的共享问题。 Pinia 和 Vuex 类似&#xff0c;但使用起来更加简单和直观。因为 Pinia 基于 Vue3 的 Composition 组合式 API 风格&…

【k8s】数据存储

一、数据存储的概念 pod的生命周期可能很短&#xff0c;会被频繁地创建和销毁。那么容器在销毁时&#xff0c;保存在容器中的数据也会被清除。这种结果对用户来说&#xff0c;在某些情况下是不乐意看到的。为了持久化保存容器的数据&#xff0c;kubernetes引入了Volume的概念。…

【Linux】 OpenSSH_9.3p2 升级到 OpenSSH_9.4p1(亲测无问题,建议收藏)

&#x1f468;‍&#x1f393;博主简介 &#x1f3c5;云计算领域优质创作者   &#x1f3c5;华为云开发者社区专家博主   &#x1f3c5;阿里云开发者社区专家博主 &#x1f48a;交流社区&#xff1a;运维交流社区 欢迎大家的加入&#xff01; &#x1f40b; 希望大家多多支…

异常处理流程

1.什么是异常源&#xff1f; 引发处理器进入对应的异常模式 2.异常源和异常模式的对应关系 1.五种异常模式&#xff0c;七种异常源 &#xff1b; 2.根据不同的异常源&#xff0c;引发处理器进入不同的异常模式&#xff0c;执行异常处理函数 3.异常源具有优先级&#xff0c;复…