RUOYI框架在实际项目中的应用三:Ruoyi微服务版本-RuoYi-Cloud

如需观看Ruoyi框架的整体介绍,请移步:RUOYI框架在实际项目中的应用一:ruoyi简介

一、Ruoyi微服务版本-Ruoyi微服务版本

1、官方资料

1:代码地址:https://gitee.com/y_project/RuoYi-Cloud.git
2:文档介绍地址:http://doc.ruoyi.vip/ruoyi-cloud/
3:演示地址:http://vue.ruoyi.vip/login

注:如果是大体量公司项目,需要使用微服务管理。就选择这个。

2、框架简介

RuoYi-Cloud 是一个 Java EE 分布式微服务架构平台,基于经典技术组合(Spring Boot、Spring Cloud & Alibaba、Vue、Element),内置模块如:部门管理、角色用户、菜单及按钮授权、数据权限、系统参数、日志管理、代码生成等。在线定时任务配置;支持集群,支持多数据源。
在这里插入图片描述

1:技术选型

1、系统环境

  • Java EE 8
  • Servlet 3.0
  • Apache Maven 3

2、主框架

  • Spring Boot 2.3.x
  • Spring Cloud Hoxton.SR9
  • Spring Framework 5.2.x
  • Spring Security 5.2.x

3、持久层

  • Apache MyBatis 3.5.x
  • Hibernate Validation 6.0.x
  • Alibaba Druid 1.2.x

4、视图层

  • Vue 2.6.x
  • Axios 0.21.0
  • Element 2.14.x

2:官方推荐软件环境版本

JDK >= 1.8 (推荐1.8版本)
Mysql >= 5.7.0 (推荐5.7版本)
Redis >= 3.0
Maven >= 3.0
Node >= 12
nacos >= 2.0.4 (ruoyi-cloud < 3.0 需要下载nacos >= 1.4.x版本)
sentinel >= 1.6.0

二、框架搭建

1:下载代码

https://gitee.com/y_project/RuoYi-Cloud.git
在这里插入图片描述
在这里插入图片描述

2:环境配置

在Ruoyi-cloud中需要用的如下中间件:

  • 数据库 、如mysql等,用来存储数据
  • redis:用来缓存数据,如token等。如果对redis不了破的,推荐看Redis-02-Redis安装和入门HelloWorld
  • nacos:用来做配置中心和注册中心,如果对nacos不了破的,推荐看:Nacos-01-Nacos的简介和安装

以上三个中间件在此不再赘述,如果公司有就用,没有的话,就自己搭建

3:配置框架数据库表

在这里插入图片描述
注:

  • 创建数据库ry-cloud并导入数据脚本ry_2021xxxx.sql(必须),quartz.sql(可选)
  • 创建数据库ry-config并导入数据脚本ry_config_2021xxxx.sql(如果有nacos就不用执行了)
  • 创建数据库ry-seata并导入数据脚本ry_seata_2021xxxx.sql(如果不涉及分布式事务,就不需要了)

4:修改配置

1:修改各模块下src/main/resources/bootstrap.yml

如果配置全部放在nacos下,那么就修改bootstrap.yml 的nacos配置
在这里插入图片描述
这里给出一个配置实例

# Tomcat
server:port: 9201# Spring
spring: application:# 应用名称name: ruoyi-systemprofiles:# 环境配置active: devcloud:nacos:discovery:# 服务注册地址server-addr: 127.0.0.1:8848namespace: ruoyi_testgroup: DEFAULT_GROUPusername: nacospassword: nacos_2024@config:# 配置中心地址server-addr: ${spring.cloud.nacos.discovery.server-addr}# 配置文件格式file-extension: yml# 共享配置shared-configs:- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}namespace: ${spring.cloud.nacos.discovery.namespace}group: ${spring.cloud.nacos.discovery.group}username: ${spring.cloud.nacos.discovery.username}password: ${spring.cloud.nacos.discovery.password}

注:
1:如果对nacos不了破的,推荐看:Nacos-01-Nacos的简介和安装
2:nacos中默认的各模块配置文件,在程序的ry_config_2021xxxx.sql 的config_info中,大家可自行获取
在这里插入图片描述

5:启动后端

打开运行基础模块(启动没有先后顺序)

  • RuoYiGatewayApplication (网关模块 必须)
  • RuoYiAuthApplication (认证模块 必须)
  • RuoYiSystemApplication (系统模块 必须)
  • RuoYiMonitorApplication (监控中心 可选)
  • RuoYiGenApplication (代码生成 可选)
  • RuoYiJobApplication (定时任务 可选)
  • RuoYFileApplication (文件服务 可选)

6:启动前段

# 进入项目目录
cd ruoyi-ui# 安装依赖
npm install# 强烈建议不要用直接使用 cnpm 安装,会有各种诡异的 bug,可以通过重新指定 registry 来解决 npm 安装速度慢的问题。
npm install --registry=https://registry.npmmirror.com# 本地开发 启动项目
npm run dev

打开浏览器,输入:(http://localhost:80 (opens new window)) 默认账户/密码 admin/admin123)
若能正确展示登录页面,并能成功登录,菜单及页面展示正常,则表明环境搭建成功

三、代码模块说明

1:后端结构

com.ruoyi     
├── ruoyi-ui              // 前端框架 [80]
├── ruoyi-gateway         // 网关模块 [8080]
├── ruoyi-auth            // 认证中心 [9200]
├── ruoyi-api             // 接口模块
│       └── ruoyi-api-system                          // 系统接口
├── ruoyi-common          // 通用模块
│       └── ruoyi-common-core                         // 核心模块
│       └── ruoyi-common-datascope                    // 权限范围
│       └── ruoyi-common-datasource                   // 多数据源
│       └── ruoyi-common-log                          // 日志记录
│       └── ruoyi-common-redis                        // 缓存服务
│       └── ruoyi-common-seata                        // 分布式事务
│       └── ruoyi-common-security                     // 安全模块
│       └── ruoyi-common-sensitive                    // 数据脱敏
│       └── ruoyi-common-swagger                      // 系统接口
├── ruoyi-modules         // 业务模块
│       └── ruoyi-system                              // 系统模块 [9201]
│       └── ruoyi-gen                                 // 代码生成 [9202]
│       └── ruoyi-job                                 // 定时任务 [9203]
│       └── ruoyi-file                                // 文件服务 [9300]
├── ruoyi-visual          // 图形化管理模块
│       └── ruoyi-visual-monitor                      // 监控中心 [9100]
├──pom.xml                // 公共依赖

2:前端结构

com.ruoyi     
├── ruoyi-ui              // 前端框架 [80]
├── ruoyi-gateway         // 网关模块 [8080]
├── ruoyi-auth            // 认证中心 [9200]
├── ruoyi-api             // 接口模块
│       └── ruoyi-api-system                          // 系统接口
├── ruoyi-common          // 通用模块
│       └── ruoyi-common-core                         // 核心模块
│       └── ruoyi-common-datascope                    // 权限范围
│       └── ruoyi-common-datasource                   // 多数据源
│       └── ruoyi-common-log                          // 日志记录
│       └── ruoyi-common-redis                        // 缓存服务
│       └── ruoyi-common-seata                        // 分布式事务
│       └── ruoyi-common-security                     // 安全模块
│       └── ruoyi-common-sensitive                    // 数据脱敏
│       └── ruoyi-common-swagger                      // 系统接口
├── ruoyi-modules         // 业务模块
│       └── ruoyi-system                              // 系统模块 [9201]
│       └── ruoyi-gen                                 // 代码生成 [9202]
│       └── ruoyi-job                                 // 定时任务 [9203]
│       └── ruoyi-file                                // 文件服务 [9300]
├── ruoyi-visual          // 图形化管理模块
│       └── ruoyi-visual-monitor                      // 监控中心 [9100]
├──pom.xml                // 公共依赖

3:实际使用过程

ruoyi的cloud框架很不错,但是很多情况下没什么用,或者用不到,那么最精简的情况是

com.ruoyi     
├── ruoyi-ui              // 前端框架 [80]
├── ruoyi-gateway         // 网关模块 [8080]
├── ruoyi-auth            // 认证中心 [9200]
├── ruoyi-api             // 接口模块
│       └── ruoyi-api-system                          // 系统接口
├── ruoyi-common          // 通用模块
│       └── ruoyi-common-core                         // 核心模块
│       └── ruoyi-common-datascope                    // 权限范围
│       └── ruoyi-common-datasource                   // 多数据源
│       └── ruoyi-common-log                          // 日志记录
│       └── ruoyi-common-redis                        // 缓存服务
│       └── ruoyi-common-security                     // 安全模块
│       └── ruoyi-common-swagger                      // 系统接口
├── ruoyi-modules         // 业务模块
│       └── ruoyi-system                              // 系统模块 [9201]
│       └── ruoyi-gen                                 // 代码生成 [9202]
│       └── ruoyi-job                                 // 定时任务 [9203]
│       └── ruoyi-file                                // 文件服务 [9300]
├──pom.xml                // 公共依赖

4:Ruoyi-cloud框架默认nacos配置

在我们启动ruoyi-cloud后,我们需要在系统中配置nacos的默认配置文件,比如
在这里插入图片描述

上边nacos中默认的各模块配置文件,在程序的ry_config_2021xxxx.sql 的config_info中,大家可自行获取
在这里插入图片描述

注:如果我们使用ruoyi-cloud自带的nacos数据库,那么打开nacos就会出现上边的配置。如果使用的是其他的nacos,大家可以从这里进行对应配置的获取。

四、功能模块说明

1:新建子模块

Maven多模块下新建子模块流程案例。

1、在ruoyi-modules下新建业务模块目录,例如:ruoyi-test。

2、在ruoyi-test业务模块下新建pom.xml文件以及src\main\java,src\main\resources目录

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://maven.apache.org/POM/4.0.0"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><parent><groupId>com.ruoyi</groupId><artifactId>ruoyi-modules</artifactId><version>x.x.x</version></parent><modelVersion>4.0.0</modelVersion><artifactId>ruoyi-modules-test</artifactId><description>ruoyi-modules-test系统模块</description><dependencies><!-- SpringCloud Alibaba Nacos --><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId></dependency><!-- SpringCloud Alibaba Nacos Config --><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId></dependency><!-- SpringCloud Alibaba Sentinel --><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-sentinel</artifactId></dependency><!-- SpringBoot Actuator --><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId></dependency><!-- Mysql Connector --><dependency><groupId>com.mysql</groupId><artifactId>mysql-connector-j</artifactId></dependency><!-- Ruoyi Common Security --><dependency><groupId>com.ruoyi</groupId><artifactId>ruoyi-common-security</artifactId></dependency><!-- Ruoyi Common Swagger --><dependency><groupId>com.ruoyi</groupId><artifactId>ruoyi-common-swagger</artifactId></dependency><!-- RuoYi Common Log --><dependency><groupId>com.ruoyi</groupId><artifactId>ruoyi-common-log</artifactId></dependency></dependencies><build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><executions><execution><goals><goal>repackage</goal></goals></execution></executions></plugin></plugins></build></project>

3、在ruoyi-modules目录下pom.xml模块节点modules添加业务模块

<module>ruoyi-test</module>

4、src/main/resources添加bootstrap.yml文件

# Tomcat
server:port: 9301# Spring
spring: application:# 应用名称name: ruoyi-testprofiles:# 环境配置active: devcloud:nacos:discovery:# 服务注册地址server-addr: 127.0.0.1:8848config:# 配置中心地址server-addr: 127.0.0.1:8848# 配置文件格式file-extension: yml# 共享配置shared-configs:- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}

5、com.ruoyi.test包下添加主启动类

package com.ruoyi.test;import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import com.ruoyi.common.security.annotation.EnableCustomConfig;
import com.ruoyi.common.security.annotation.EnableRyFeignClients;
import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2;/*** 测试模块* * @author ruoyi*/
@EnableCustomConfig
@EnableCustomSwagger2
@EnableRyFeignClients
@SpringCloudApplication
public class RuoYiTestApplication
{public static void main(String[] args){SpringApplication.run(RuoYiTestApplication.class, args);System.out.println("(♥◠‿◠)ノ゙  测试模块启动成功   ლ(´ڡ`ლ)゙  \n" +" .-------.       ____     __        \n" +" |  _ _   \\      \\   \\   /  /    \n" +" | ( ' )  |       \\  _. /  '       \n" +" |(_ o _) /        _( )_ .'         \n" +" | (_,_).' __  ___(_ o _)'          \n" +" |  |\\ \\  |  ||   |(_,_)'         \n" +" |  | \\ `'   /|   `-'  /           \n" +" |  |  \\    /  \\      /           \n" +" ''-'   `'-'    `-..-'              ");}
}

2:系统接口-springDoc冒烟测试

  • ruoyi-cloud版本<3.6.4 时,使用的是swagger 作为系统接口文档展示,
  • ruoyi-cloud版本>3.6.4 时,改用了SpringDoc作为系统接口文档展示。

3:ruoyi-cloud版本<3.6.4 时,使用的是swagger

swagger的基础使用,请看:swagger-springboot详解

1>:使用ruoyi框架后自己创建swagger

1):添加依赖
添加依赖<!-- SpringBoot Web -->
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId>
</dependency><!-- Swagger -->
<dependency><groupId>io.springfox</groupId><artifactId>springfox-swagger2</artifactId><version>${swagger.fox.version}</version>
</dependency><!-- Swagger UI -->
<dependency><groupId>io.springfox</groupId><artifactId>springfox-swagger-ui</artifactId><version>${swagger.fox.version}</version>
2):在application.yml添加服务配置
swagger:title: 系统模块接口文档license: Powered By ruoyilicenseUrl: https://ruoyi.vip
3):在Application启动类加入注解@SpringBootApplication和@EnableSwagger2。
@EnableSwagger2
@SpringBootApplication
public class RuoYiSwaggerApplication
{public static void main(String[] args){SpringApplication.run(RuoYiSwaggerApplication.class, args);System.out.println("(♥◠‿◠)ノ゙  Swagger启动成功   ლ(´ڡ`ლ)゙  \n" +" .-------.       ____     __        \n" +" |  _ _   \\      \\   \\   /  /    \n" +" | ( ' )  |       \\  _. /  '       \n" +" |(_ o _) /        _( )_ .'         \n" +" | (_,_).' __  ___(_ o _)'          \n" +" |  |\\ \\  |  ||   |(_,_)'         \n" +" |  | \\ `'   /|   `-'  /           \n" +" |  |  \\    /  \\      /           \n" +" ''-'   `'-'    `-..-'              ");}
}

2>:项目中存在ruoyi-common-swagger模块,可忽略上边三个步骤,可以直接依赖后使用。

1)、业务模块添加依赖
<!-- ruoyi common swagger -->
<dependency><groupId>com.ruoyi</groupId><artifactId>ruoyi-common-swagger</artifactId>
</dependency>
2):增加配置文件参数
# swagger配置
swagger:title: 系统模块接口文档license: Powered By ruoyilicenseUrl: https://ruoyi.vip
3):在Application启动类加入系统接口注解@EnableCustomSwagger2
@EnableCustomConfig
@EnableCustomSwagger2
@EnableRyFeignClients
@SpringCloudApplication
public class RuoYiSystemApplication
{public static void main(String[] args){SpringApplication.run(RuoYiSystemApplication.class, args);System.out.println("(♥◠‿◠)ノ゙  系统模块启动成功   ლ(´ڡ`ლ)゙  \n" +" .-------.       ____     __        \n" +" |  _ _   \\      \\   \\   /  /    \n" +" | ( ' )  |       \\  _. /  '       \n" +" |(_ o _) /        _( )_ .'         \n" +" | (_,_).' __  ___(_ o _)'          \n" +" |  |\\ \\  |  ||   |(_,_)'         \n" +" |  | \\ `'   /|   `-'  /           \n" +" |  |  \\    /  \\      /           \n" +" ''-'   `'-'    `-..-'              ");}
}
4):测试验证

访问http://{ip}:{port}/swagger-ui/index.html地址,出现如下图表示成功。

4:ruoyi-cloud版本>3.6.4 时,改用了SpringDoc

1>:使用ruoyi框架后自己创建swagger

1)、添加依赖
<!-- RuoYi Common Swagger -->
<dependency><groupId>com.ruoyi</groupId><artifactId>ruoyi-common-swagger</artifactId>
</dependency>
2)、在application.yml添加服务配置
server:port: 6666spring:application:name: ruoyi-xxxx# springdoc配置
springdoc:# 通过网关使用地址# gatewayUrl: http://localhost:8080/${spring.application.name}# 单独运行使用本机gatewayUrl: http://localhost:6666api-docs:# 是否开启接口文档enabled: trueinfo:# 标题title: '测试接口文档'# 描述description: '测试接口描述'# 作者信息contact:name: RuoYiurl: https://ruoyi.vip
3)、在Application启动类加入注解@SpringBootApplication。
@SpringBootApplication
public class RuoYiSwaggerApplication
{public static void main(String[] args){SpringApplication.run(RuoYiSwaggerApplication.class, args);System.out.println("(♥◠‿◠)ノ゙  Swagger启动成功   ლ(´ڡ`ლ)゙  \n" +" .-------.       ____     __        \n" +" |  _ _   \\      \\   \\   /  /    \n" +" | ( ' )  |       \\  _. /  '       \n" +" |(_ o _) /        _( )_ .'         \n" +" | (_,_).' __  ___(_ o _)'          \n" +" |  |\\ \\  |  ||   |(_,_)'         \n" +" |  | \\ `'   /|   `-'  /           \n" +" |  |  \\    /  \\      /           \n" +" ''-'   `'-'    `-..-'              ");}
}

2>:项目中存在ruoyi-common-swagger模块,可忽略上边三个步骤,可以直接依赖后使用。

1)、业务模块添加依赖
<!-- ruoyi common swagger -->
<dependency><groupId>com.ruoyi</groupId><artifactId>ruoyi-common-swagger</artifactId>
</dependency>
2)、在ruoyi-xxxx-dev.yml添加接口配置
springdoc方式,ruoyi-cloud版本 > 3.6.4 使用
# springdoc配置  
springdoc:# 通过网关使用地址# gatewayUrl: http://localhost:8080/${spring.application.name}# 单独运行使用本机gatewayUrl: http://localhost:6666api-docs:# 是否开启接口文档enabled: trueinfo:# 标题title: '测试接口文档'# 描述description: '测试接口描述'# 作者信息contact:name: RuoYiurl: https://ruoyi.vip
3):测试验证

访问http://{ip}:{port}/swagger-ui/index.html地址

5:其他拓展功能

除了ruoyi内置的很多功能以外,如果我们想对系统代码进行中间技术框架替换,如knife4j替换swagger,使用minio,使用es等,我们都可以从容的增加和使用,在ruoyi网站中也有类似的文档指导,大家可以参考:
在这里插入图片描述

6:如何更换项目包路径

我们使用过程中还有很多问题,比如因为ruoyi默认的是com.ruoyi路径,我们实际使用过程中要改成公司名,比如com.baidu。此时ruoyi也为我们提供了很多常用工具。

在这里插入图片描述
在这里插入图片描述

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

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

windbg集成python环境(pykd)

背景: 调试FPU指令过程时&#xff0c;需要一直跟踪FPU Status寄存器TOP字段(ST寄存器对应的BC寄存器)&#xff0c;TOP寄存器位于FPU Status[13:11]&#xff0c;这种转换过程并非一目了然(如下图)&#xff1a; [Disassembly窗口fld指令执行后&#xff0c;Registers窗口中fpsw的…

微信小程序threejs三维开发

微信小程序threejs开发 import * as THREE from three; const { performance, document, window, HTMLCanvasElement, requestAnimationFrame, cancelAnimationFrame, core, Event, Event0 } THREE .DHTML import Stats from three/examples/jsm/libs/stats.module.js; im…

【算法】双指针、递归与回溯、排序、查找

⭐️个人主页&#xff1a;小羊 ⭐️所属专栏&#xff1a;Linux 很荣幸您能阅读我的文章&#xff0c;诚请评论指点&#xff0c;欢迎欢迎 ~ 目录 持续更新中...1、双指针移动零复写零快乐数长度最小的子数组dd爱框框 2、递归与回溯3、排序算法4、查找算法 持续更新中… 1、双指…

How to install cangjie on Linux mint 22.1

概述 仓颉编程语言是一款面向全场景智能的新一代编程语言&#xff0c;主打原生智能化、天生全场景、高性能、强安全。主要应用于鸿蒙原生应用及服务应用等场景中&#xff0c;为开发者提供良好的编程体验。 今天&#xff0c;我们介绍一下仓颉语言在Linux mint 22.1上的安装。 …

杰理可视化SDK-手机三方通话控制

杰理可视化SDK-手机三方通话控制 手机三方通话功能杰理SDK三方通话控制SDK三方通话状态获取SDK三方通话处理 手机三方通话功能是手机常用的功能之一。本篇文章简单介绍了杰理可视化SDK在蓝牙耳机应用中&#xff0c;当手机存在三方通话来电或正在进行三方通话时&#xff0c;蓝牙…

【二分算法】-- 寻找旋转排序数组中的最小值

文章目录 1. 题目2. 题目解析3. 代码 1. 题目 在线oj 2. 题目解析 解法一&#xff1a;暴力查找最小值 时间复杂度&#xff1a;0(N) 解法二&#xff1a;二分查找算法 【二段性】&#xff1a; A~B&#xff1a;nums[i] > nums[i 1] C~D&#xff1a;nums[i] < nums[i…

音视频入门基础:RTCP专题(1)——RTCP官方文档下载

一、引言 实时传输控制协议&#xff08;Real-time Transport Control Protocol或RTP Control Protocol或简写RTCP&#xff09;是实时传输协议&#xff08;RTP&#xff09;的一个姐妹协议。RTCP由《RFC 3550》定义&#xff08;取代废弃的《RFC 1889》&#xff09;。RTP使用一个…

OrioleDB: 新一代PostgreSQL存储引擎

PostgreSQL 12 引入了可插拔式的表存储方法接口&#xff0c;允许为不同的表选择不同的存储机制&#xff0c;例如用于 OLTP 操作的堆表&#xff08;HEAP、默认&#xff09;、用于 OLAP 操作的列式表&#xff08;Citus&#xff09;&#xff0c;以及用于超快速搜索处理的内存表。 …

1.5 Spring Boot项目打包和运行

本文介绍了如何使用Spring Boot进行项目打包和运行。首先&#xff0c;讲解了如何将Spring Boot项目打包为可执行的JAR包&#xff0c;并直接运行&#xff0c;无需部署到外部Web服务器。接着&#xff0c;介绍了如何将项目打包为WAR包&#xff0c;以便部署到Web容器中&#xff0c;…

2.7 滑动窗口专题:串联所有单词的子串

LeetCode 30. 串联所有单词的子串算法对比分析 1. 题目链接 LeetCode 30. 串联所有单词的子串 2. 题目描述 给定一个字符串 s 和一个字符串数组 words&#xff0c;words 中所有单词长度相同。要求找到 s 中所有起始索引&#xff0c;使得从该位置开始的连续子串包含 words 中所…

vue中,watch里,this为undefined的两种解决办法

提示&#xff1a;vue中&#xff0c;watch里&#xff0c;this为undefined的两种解决办法 文章目录 [TOC](文章目录) 前言一、问题二、方法1——使用function函数代替箭头函数()>{}三、方法2——使用that总结 前言 ‌‌‌‌‌尽量使用方法1——使用function函数代替箭头函数()…

uniapp移动端图片比较器组件,仿英伟达官网rtx光追图片比较器功能

组件下载地址&#xff1a;https://ext.dcloud.net.cn/plugin?id22609 已测试h5和微信小程序&#xff0c;理论支持全平台 亮点&#xff1a; 简单易用 使用js计算而不是resize属性&#xff0c;定制化程度更高 组件挂在后可播放指示线动画&#xff0c;提示用户可以拖拽比较图片…

SDL3 游戏开发 Windows 环境搭建

SDL3 游戏开发 Windows 环境搭建 一、准备工作1.1 必备工具与库安装1.1.1 CMake1.1.2 MinGW-w641.1.3 Ninja1.1.4 Git1.1.5 SDL3 及扩展库1.1.6 VSCode 及插件 二、配置VSCode项目并验证环境2.1 创建测试源文件2.2 编写CMakeLists.txt文件和CMakePresets.json2.2.1 使用VSCode的…

【sql靶场】第13、14、17关-post提交报错注入保姆级教程

目录 【sql靶场】第13、14、17关-post提交报错注入保姆级教程 1.知识回顾 1.报错注入深解 2.报错注入格式 3.使用的函数 4.URL 5.核心组成部分 6.数据编码规范 7.请求方法 2.第十三关 1.测试闭合 2.列数测试 3.测试回显 4.爆出数据库名 5.爆出表名 6.爆出字段 …

esxi,vcenter6.0安装指导

前言 esxi6.0安装和esxi6.7步骤基本一样&#xff0c;可参考vmware esxi vcenter6.7安装教程&#xff08;dell&#xff09; 环境依赖以及安装包 esxi6.0安装包vcenter6.0安装不同于6.7&#xff0c;6.5通过导入ova模版安装&#xff0c;需要安装在windows server 2008或者windo…

BigFoot Decursive lua

BigFoot Decursive lua 一键驱散脚本 国际化 ogg语音提示 初始化

2024山东大学计算机复试上机真题

2024山东大学计算机复试上机真题 2024山东大学计算机复试机试真题 历年山东大学计算机复试上机真题 历年山东大学计算机复试机试真题 在线评测&#xff1a;传动门&#xff1a;pgcode.cn 最长递减子序列 题目描述 输入数字 n&#xff0c;和 n 个整数&#xff0c;输出该数字…

【AI News | 20250316】每日AI进展

AI Repos 1、ReActMCP 将网络搜索能力集成到AI助手中的一个MCP服务&#xff1a;ReActMCP Web Search&#xff0c;相当于给AI装了个搜索引擎&#xff0c;可以实时查找最新的内容。它基于Exa API执行基本和高级网络搜索&#xff0c;高级搜索比如限制搜索的网站范围、指定日期范围…

【大模型实战篇】使用GPTQ量化QwQ-32B微调后的推理模型

1. 量化背景 之所以做量化&#xff0c;就是希望在现有的硬件条件下&#xff0c;提升性能。量化能将模型权重从高精度&#xff08;如FP32&#xff09;转换为低精度&#xff08;如INT8/FP16&#xff09;&#xff0c;内存占用可减少50%~75%。低精度运算&#xff08;如INT8&#xf…

Unity 笔记:在EditorWindow中绘制 Sorting Layer

在Unity开发过程中&#xff0c;可能会对旧资源进行批量修改&#xff0c;一个个手动修改费人费事&#xff0c;所以催生出了一堆批量工具。 分享一下在此过程中绘制 Sorting Layer 面板的代码脚本。 示意图&#xff1a; 在 EditorGUI 和 EditorGUILayer 中内置了 SortingLayerF…