layui入门

news2025/2/23 19:43:02

layui入门

  • 一.ayui简介
    • 1.简单易用
    • 2.组件丰富
    • 3.高度定制化
    • 4.响应式布局
    • 5.轻量灵活
  • 2.layui的入门基础操作
  • 3.登录实例
  • 4.注册实例

一.ayui简介

Layui(流行音 “layui”,来自“领域的模块化”)是一款前端UI框架,专注于提升 Web
开发效率。它基于流行的Web开发技术(HTML、CSS、JavaScript)构建,具有简洁、易用的特点,广泛应用于各种网站和Web应用的开发中。

以下是 Layui 的一些主要特点和功能:

1.简单易用

Layui 的设计理念是“零学习成本”,它提供了简洁清晰的API接口,使得开发者能够快速上手使用,无需花费大量时间去学习。

2.组件丰富

Layui 提供了丰富的常用组件,如表单、表格、导航、按钮、弹窗等,覆盖了大部分常见的页面元素,可以快速构建出美观、实用的界面。

3.高度定制化

Layui 允许开发者按需引入所需的模块和组件,避免了不必要的代码冗余,同时也方便进行个性化的定制和扩展。

4.响应式布局

Layui 基于响应式设计,可以自动适应不同屏幕尺寸的设备,保证页面在手机、平板和PC等多种设备上的良好显示效果。

5.轻量灵活

Layui 的整体体积非常小,压缩后仅约 20KB 左右,加载速度快,对网页性能影响较小。同时,Layui 的模块化设计也使得它非常灵活,可以根据项目需求选择性地使用和定制各个组件。

总的来说,Layui
是一个简单、易用、高效的前端UI框架,适用于各类Web开发项目,特别是中小型项目。它的目标是提供一种便捷、快速的前端开发方案,让开发者能够更加专注于业务逻辑的实现,而不需要过多关注细节和繁琐的前端技术。
Layui 提供了一些基本的操作和使用方法,下面是 layui 的入门基础操作:

2.layui的入门基础操作

引入 layui:在 HTML 文件中引入 layui 的 CSS 和 JS 文件,可以直接使用官方的 CDN 地址,也可以下载并本地引入。

html
<!DOCTYPE html>
<html>

<head>
  <link rel="stylesheet" href="https://cdn.staticfile.org/layui/2.5.7/css/layui.min.css">
</head>

<body>
  <!-- HTML 内容 -->
  
  <script src="https://cdn.staticfile.org/layui/2.5.7/layui.min.js"></script>
</body>

</html>```

使用组件:Layui 提供了丰富的组件,可以根据需要选择使用。
例如,使用 Layui 的按钮组件和弹窗组件:

```html
html
<button class="layui-btn">普通按钮</button>

<button class="layui-btn layui-btn-primary">主要按钮</button>

<button class="layui-btn layui-btn-normal">正常按钮</button>

<button class="layui-btn layui-btn-warm">警告按钮</button>

<button class="layui-btn layui-btn-danger">危险按钮</button>

<script>
  layui.use('layer', function () {
    var layer = layui.layer;
    
    layer.msg('Hello World');
  });
</script>
表单验证:使用 Layui 的表单验证功能可以对用户输入进行验证。
html
<form class="layui-form" action="">
  <div class="layui-form-item">
    <label class="layui-form-label">用户名</label>
    <div class="layui-input-block">
      <input type="text" name="username" lay-verify="required|username" placeholder="请输入用户名" autocomplete="off"
        class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">密码</label>
    <div class="layui-input-block">
      <input type="password" name="password" lay-verify="required|password" placeholder="请输入密码" autocomplete="off"
        class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="login">登录</button>
    </div>
  </div>
</form>

<script>
  layui.use('form', function () {
    var form = layui.form;

    form.verify({
      username: [/^[a-zA-Z0-9_]{4,16}$/, '用户名必须是4到16位的字母、数字或下划线'],
      password: [/^[\S]{6,12}$/, '密码必须是6到12位,且不能出现空格']
    });
  });
</script>

以上是 Layui 的一些基本操作示例,你可以根据自己的需求和具体情况进行使用和定制。Layui
官方文档提供了更详细的说明和示例,推荐你在开发过程中参考官方文档以获得更全面的了解和指导。

3.登录实例

1.实体

/**
 * 
 */
package com.niyin.entity;

/**
 * @author 匿瘾
 *
 * @date:2023年7月10日 下午8:19:39
 * 
 */
public class Regist {
	private long id ;
	private String name;
	private String loginName;//账号
	private String pwd;//密码
	private long rid;

	/**
	 * 
	 */
	public Regist() {
		// TODO Auto-generated constructor stub
	}

	public Regist(long id, String name, String loginName, String pwd, long rid) {
		super();
		this.id = id;
		this.name = name;
		this.loginName = loginName;
		this.pwd = pwd;
		this.rid = rid;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	public String getPwd() {
		return pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	public long getRid() {
		return rid;
	}

	public void setRid(long rid) {
		this.rid = rid;
	}

	@Override
	public String toString() {
		return "Regist [id=" + id + ", name=" + name + ", loginName=" + loginName + ", pwd=" + pwd + ", rid=" + rid
				+ "]";
	}
	
}

2.dao方法

package com.niyin.dao;

import java.util.List;

import com.niyin.entity.User;
import com.niyin.util.BaseDao;
import com.niyin.util.PageBean;

public class UserDao extends BaseDao<User> {
	
 public List<User> executeQuery(Class<User> clz, PageBean pageBean) throws Exception {
		String sql="select * from t_oa_user where 1=1 ";
		
	return super.executeQuery(sql, User.class, pageBean);
}
	
 
 public User login(User user) throws Exception {
		String sql="select * from t_oa_user  where loginName ='"+user.getLoginName()+"' and pwd = '"+user.getPwd()+"'";
	 List<User> list = super.executeQuery(sql, User.class, null);
	 if (list!=null&&list.size()==1) {
		return  list.get(0);
	}
	 return null;
}
 public int registered(User user) throws Exception {
		String sql = "insert into t_oa_user(name,loginName,pwd,rid) values(?,?,?,?)";		
		return executeUpdate(sql, user,new String[] {"name","loginName","pwd","rid"});
	}
 
 
 
 public static void main(String[] args) {
	try {
		System.out.println(new UserDao().login(new User(0, "", "zhangsan", "1234",0)));
	} catch (Exception e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
}
}

3.子实现类

package com.niyin.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.niyin.dao.UserDao;
import com.niyin.entity.User;
import com.niyin.framework.ActionSupport;
import com.niyin.framework.ModelDriver;
import com.niyin.util.ResponseUtil;

public class Useraction extends ActionSupport implements ModelDriver<User> {
private User user=new User();
private UserDao userdao=new UserDao();

	public String login(HttpServletRequest req, HttpServletResponse resp) {

		try {
			User u = userdao.login(user);
		ResponseUtil.writeJson(resp, u);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return super.execute(req, resp);
	}

	public void registered(HttpServletRequest req, HttpServletResponse resp) {
		try {
			int n = userdao.registered(user);
			if(n>0) {
				ResponseUtil.writeJson(resp, n);
			}
			ResponseUtil.writeJson(resp, null);
			
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	@Override
	public User getModel() {
		// TODO Auto-generated method stub
		return user;
	}

}

4.jsp代码

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@include file="common/header.jsp" %>>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
 <link rel="stylesheet" rev="stylesheet" href="${pageContext.request.contextPath}/static/css/iconfont.css" type="text/css" media="all">
        <link rel="stylesheet" rev="stylesheet" href="${pageContext.request.contextPath}/static/css/login.css" type="text/css" media="all">
        <style> body{color:#;}a{color:#;}a:hover{color:#;}.bg-black{background-color:#;}.tx-login-bg{background:url(static/images/bg.jpg) no-repeat 0 0;}</style>
</head>
 <body class="tx-login-bg">
        <div class="tx-login-box">
            <div class="login-avatar bg-black"><i class="iconfont icon-wode"></i></div>
				<ul class="tx-form-li row">
					<li class="col-24 col-m-24"><p><input type="text" id="username" placeholder="登录账号" class="tx-input"></p></li>
					<li class="col-24 col-m-24"><p><input type="password" id="password" placeholder="登录密码" class="tx-input"></p></li>
					<li class="col-24 col-m-24"><p class="tx-input-full"><button id="login" class="tx-btn tx-btn-big bg-black">登录</button></p></li>
					<li class="col-12 col-m-12"><p><a href="#" class="f-12 f-gray">新用户注册</a></p></li>
					<li class="col-12 col-m-12"><p class="ta-r"><a href="#" class="f-12 f-gray">忘记密码</a></p></li>
				</ul>
            </div>
            
            <script>
//一般直接写在一个js文件中
layui.use(['layer','jquery'], function(){
  var layer = layui.layer
  ,form = layui.form
  ,$=layui.jquery;
  
  $("#login").click(function(){
	  $.ajax({
		url:'${pageContext.request.contextPath}/user.action?methodName=login',
    		dataType:'json',
		data:{
			loginName:$("#username").val(),
		    pwd:$("#password").val()
		    
			
		},
		method:'post',
		success:function(data){
			if(data) {
				layer.alert('酷毙了', {icon: 1});
			} else {
				layer.alert('失败了', {icon: 5});
			} 
		}
		
	  });
  })
});
</script> 
    </body>
</html>

运行结果
在这里插入图片描述

4.注册实例

1.实体类

/**
 * 
 */
package com.zking.entity;

/**
 * @author 匿瘾
 *
 * @date:2023年7月10日 下午8:19:39
 * 
 */
public class Regist {
	private long id ;
	private String name;
	private String loginName;//账号
	private String pwd;//密码
	private long rid;

	/**
	 * 
	 */
	public Regist() {
		// TODO Auto-generated constructor stub
	}

	public Regist(long id, String name, String loginName, String pwd, long rid) {
		super();
		this.id = id;
		this.name = name;
		this.loginName = loginName;
		this.pwd = pwd;
		this.rid = rid;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	public String getPwd() {
		return pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	public long getRid() {
		return rid;
	}

	public void setRid(long rid) {
		this.rid = rid;
	}

	@Override
	public String toString() {
		return "Regist [id=" + id + ", name=" + name + ", loginName=" + loginName + ", pwd=" + pwd + ", rid=" + rid
				+ "]";
	}
	
}

2.dao方法

package com.niyin.dao;

import java.util.List;

import com.niyin.entity.User;
import com.niyin.util.BaseDao;
import com.niyin.util.PageBean;

public class UserDao extends BaseDao<User> {
	
 public List<User> executeQuery(Class<User> clz, PageBean pageBean) throws Exception {
		String sql="select * from t_oa_user where 1=1 ";
		
	return super.executeQuery(sql, User.class, pageBean);
}
	
 
 public User login(User user) throws Exception {
		String sql="select * from t_oa_user  where loginName ='"+user.getLoginName()+"' and pwd = '"+user.getPwd()+"'";
	 List<User> list = super.executeQuery(sql, User.class, null);
	 if (list!=null&&list.size()==1) {
		return  list.get(0);
	}
	 return null;
}
 public int registered(User user) throws Exception {
		String sql = "insert into t_oa_user(name,loginName,pwd,rid) values(?,?,?,?)";		
		return executeUpdate(sql, user,new String[] {"name","loginName","pwd","rid"});
	}
 
 
 
 public static void main(String[] args) {
	try {
		System.out.println(new UserDao().login(new User(0, "", "zhangsan", "1234",0)));
	} catch (Exception e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
}
}

3.子实现类

package com.niyin.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.niyin.dao.UserDao;
import com.niyin.entity.User;
import com.niyin.framework.ActionSupport;
import com.niyin.framework.ModelDriver;
import com.niyin.util.ResponseUtil;

public class Useraction extends ActionSupport implements ModelDriver<User> {
private User user=new User();
private UserDao userdao=new UserDao();

	public String login(HttpServletRequest req, HttpServletResponse resp) {

		try {
			User u = userdao.login(user);
		ResponseUtil.writeJson(resp, u);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return super.execute(req, resp);
	}

	public void registered(HttpServletRequest req, HttpServletResponse resp) {
		try {
			int n = userdao.registered(user);
			if(n>0) {
				ResponseUtil.writeJson(resp, n);
			}
			ResponseUtil.writeJson(resp, null);
			
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	@Override
	public User getModel() {
		// TODO Auto-generated method stub
		return user;
	}

}```

4.jsp代码
```html
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ include file = "common/header.jsp" %>
<!DOCTYPE html PUBLIC >
<html>
<head>
  <head>
        <meta name="viewport" content="width=device-width,initial-scale=1.33,minimum-scale=1.0,maximum-scale=1.0">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="renderer" content="webkit">
        <title>会员登录-演示网站</title>
        <meta http-equiv="Content-Language" content="zh-CN">
        <link rel="stylesheet" rev="stylesheet" href="${pageContext.request.contextPath }/static/css/iconfont.css" type="text/css" media="all">
        <link rel="stylesheet" rev="stylesheet" href="${pageContext.request.contextPath }/static/css/login.css" type="text/css" media="all">
        <style> body{color:#;}a{color:#;}a:hover{color:#;}.bg-black{background-color:#;}.tx-login-bg{background:url(static/images/bg.jpg) no-repeat 0 0;}</style>
    </head>
    <body class="tx-login-bg">
        <div class="tx-login-box">
            <div class="login-avatar bg-black"><i class="iconfont icon-wode"></i></div>
				<ul class="tx-form-li row">
					<li class="col-24 col-m-24"><p><input type="text" id="name" placeholder="姓名" class="tx-input"></p></li>
					<li class="col-24 col-m-24"><p><input type="text" id="rid" placeholder="职位选择" class="tx-input"></p></li>
					<li class="col-24 col-m-24"><p><input type="text" id="loginName" placeholder="昵称" class="tx-input"></p></li>
					<li class="col-24 col-m-24"><p><input type="password" id="password" placeholder="注册密码" class="tx-input"></p></li>
					<li class="col-24 col-m-24"><p class="tx-input-full"><button id="login" class="tx-btn tx-btn-big bg-black">注册</button></p></li>
					<li class="col-12 col-m-12"><p><a href="#" class="f-12 f-gray">登录</a></p></li>
					<li class="col-12 col-m-12"><p class="ta-r"><a href="#" class="f-12 f-gray">忘记密码</a></p></li>
				</ul>
            </div>
            
	<script>	
	//一般直接写在一个js文件中
	layui.use(['layer', 'jquery'], function(){
	  var layer = layui.layer
	  ,$ = layui.jquery;
		
	  $("#login").click(function(){
		  $.ajax({
			  url:"${pageContext.request.contextPath }/user.action?methodName=registered",
			  dataType:'json',
			  data:{
				  name:$("#name").val(),
				  loginName:$("#loginName").val(),
				  pwd:$("#password").val() ,
				  rid:$("#rid").val() 
			  },
			  method:'post',
			  success:function(data){
				  if(data){
					  layer.alert("注册成功",{icon:6});
				  }else{
					  layer.alert("注册失败",{icon:5});
				  }
			  }
		  })
		  
	  })
	
	});
	</script>
    </body>
</html>

在这里插入图片描述
实现就这样了

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

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

相关文章

Jmeter接口关联(三)【使用正则表达式提取值】以及正则表达式提取器中模板的含义及用法

文章目录 前言一、Jmeter中使用正则表达式匹配 1、选择 RegExp Tester2、在线程组------》添加------》后置处理器-------里面添加一个“正则表达式提取器”二、关于正则表达式提取器里面字段的解释 参数说明三、进一步解释Jmeter正则表达式提取器中的模板 1、当模板设置为$0$ …

每个开发人员都应该知道的VS Code入门技巧

这里有一些每个开发人员都应该知道的关于Visual Studio Code (VS Code)的技巧: 1、自定义键盘快捷键:VS Code允许您根据自己的喜好自定义键盘快捷键。点击“文件”->“首选项”->“键盘快捷键”或使用快捷键Ctrl K和Ctrl S打开键盘快捷键编辑器。可以修改现有快捷方式或…

抖音seo源码打包分享

抖音seo源码搭建----分享给各位开发者 获取视频列表 $Video_model new App_Model_Douyin_MysqlVideoStorage(); $video_list $Video_model->getList($where,$this->index,$this->count,$sort); $temp_video_model new App_Model_Douyin_…

微信小程序input的placeholder脱离文档流

今天进行真机调试时input的提示词 placeholder脱离了文档流&#xff0c;但是奇怪的是input框没有脱离文档流 如下图所示&#xff1a; 微信开发工具正常&#xff1a; 真机&#xff1a;不正常 脱离文档流 解决方法&#xff1a; <view clas…

给一个体积水,用不同体积的容器去装

这个有两个方案&#xff1a; 1.每个都装得最满&#xff0c;减少瓶子容积损失 //xzlist 瓶子容积排序 tj水总体积 xzzc各个体积瓶子数 public static void Boxjs(int tj, List<Map<String,Object>> xzlist, List<Map<String,Object>> xzzc){boolean f…

Linux信号机制-2

转自&#xff1a;Linux信号处理_linux 信号处理函数_努力啃C语言的小李的博客-CSDN博客 什么是信号 信号本质上是在软件层次上对中断机制的一种模拟&#xff0c;其主要有以下几种来源&#xff1a; 程序错误&#xff1a;除零&#xff0c;非法内存访问等。 外部信号&#xff1a…

Sql 语句小课堂8:求特定字段平均值的问题

Sql 语句小课堂8&#xff1a;求特定字段平均值的问题 问题来源初始数据超标条件方案一&#xff1a;得出汇总结果方案二&#xff1a;在原有数据上附加其结果 小结 问题来源 最近老顾变得原来越咸鱼了&#xff0c;好久没去逛 CSDN 问答了&#xff0c;于是灵感枯竭&#xff0c;不…

postgresql(二):pgsql导出数据

pgsql导出数据 1、概述2、导出数据2.1、导出所有库2.2、导出指定库2.3、导出指定表 3、总结 1、概述 大家好&#xff0c;我是欧阳方超&#xff0c;可以关注我的公众号“欧阳方超”&#xff0c;后续内容将在公众号首发。 今天介绍一下使用pg数据库的命令导出数据的操作。 2、导…

今天给大家分享几款好用的时间管理APP

在现代社会&#xff0c;时间是我们最宝贵的资源之一。有效地管理时间可以提高我们的工作和学习效率&#xff0c;从而实现更好的生活和工作质量。随着技术的不断发展&#xff0c;越来越多的时间管理APP涌现出来。今天&#xff0c;我想向大家分享几款好用的时间管理APP&#xff0…

没有有效的提示词(Prompt),要 Stable Diffusion 何用?

再好的prompt&#xff0c;不如有个简单的prompt工具。 本文推荐一个日本人写的prompt插件&#xff0c;我进行了汉化&#xff0c;并补充了3000多个提示词。只需要鼠标点点就可以了&#xff01;&#xff01;&#xff01; 引子&#xff1a; 今天去看了看Stable Diffusion插件版本…

MobPush Android常见问题

配置了默认点击跳转界面&#xff0c;对所有通道都有效吗 只对MobPush、魅族、小米、华为、OPPO、VIVO通道有效&#xff0c;对FCM通道无效。 如何获取回调参数 进程存活的情况下&#xff0c;可在我们的回调监听中看到通知详情&#xff0c;可以根据回调参数进行处理。 详情请查…

阿里云ECS云服务器的云盘使用

在我阿里云控制台上&#xff0c;可以看到有额外的磁盘&#xff08;2个实例&#xff0c;3个磁盘&#xff09; 找到对应云服务实例&#xff0c;看到了云盘信息 状态显示的挂接点是&#xff1a;/dev/xvdb 进入服务器却无法找到&#xff0c;也无法挂载 执行命令&#xff1a;fdisk …

c# 实现条件编译

创建三个不同的项目配置&#xff0c;分别代表不同的平台&#xff0c;在 Visual Studio 中&#xff0c;可以通过右键单击项目&#xff0c;选择“属性”&#xff0c;然后在“生成”选项卡下配置不同的条件编译符号。 针对 Windows 平台&#xff1a;在“生成”选项卡的“条件编译…

iOS--编译

前言 iOS 开发中使用的是编译语言&#xff0c;所谓编译语言是在执行的时候&#xff0c;必须先通过编译器生成机器码&#xff0c;机器码可以直接在CPU上执行&#xff0c;所以执行效率较高。他是使用 Clang / LLVM 来编译的。LLVM是一个模块化和可重用的编译器和工具链技术的集合…

Tomcat之配置文件详解

Tomcat 目录 安装好 Tomcat 后&#xff0c;打开它的文件夹&#xff0c;可以看到以下目录 bin:存放各种启动、关闭和其它程序的脚本 conf:配置文件及相关数据文件存放的目录 lib:Tomcat 使用的库文件存放的目录&#xff0c;如存放 Servlet 规范的 API logs:默认日志文件存放…

centos 配置好网络后无法ping 通百度

问题&#xff1a; ping 自己配置的ip地址能够ping通&#xff0c;ping 连接的WiFi &#xff08;可以上外网&#xff09;地址也能ping通&#xff0c;但是ping www.baidu.com 却ping不同&#xff1b; 配置 处理方法&#xff1a; 我的虚拟机开通了三张网卡&#xff0c;150段…

更新NGINX域名证书文件

背景&#xff1a; 由于域名正式认证即将要到期&#xff0c;需要更新基于nginx的域名证书文件。 一、更新nginx域名证书文件 1、查看对应域名使用的正式文件名 # 查看使用的域名证书文件 # 我的环境配置https的nginx相关配置文件是&#xff1a;ierp_https.confcat /usr/loca…

Vue3+Vite+Pinia+Naive后台管理系统搭建之二:scss 的安装和使用

前言 如果对 vue3 的语法不熟悉的&#xff0c;可以移步 Vue3.0 基础入门&#xff0c;快速入门。 1. 安装依赖 yarn add sass -D // or npm install sass -D 2. 页面样式初始化 reset.scss /* 新建 src/assets/style/reset.scss */ /* 页面样式初始化 */ html, body, div, s…

前端Vue自定义水平步骤条组件

随着技术的发展&#xff0c;开发的复杂度也越来越高&#xff0c;传统开发方式将一个系统做成了整块应用&#xff0c;经常出现的情况就是一个小小的改动或者一个小功能的增加可能会引起整体逻辑的修改&#xff0c;造成牵一发而动全身。 通过组件化开发&#xff0c;可以有效实现…

edk2 security boot校验流程

edk2整体架构 关于安全校验的核心逻辑 Code\Edk2\MdeModulePkg\Universal\SecurityStubDxe\SecurityStub.c Status gBS->InstallMultipleProtocolInterfaces (&mSecurityArchProtocolHandle,&gEfiSecurity2ArchProtocolGuid,&mSecurity2Stub,&gEfiSecurit…