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

news2025/3/19 6:47:49

如需观看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-system
  profiles:
    # 环境配置
    active: dev
  cloud:
    nacos:
      discovery:
        # 服务注册地址
        server-addr: 127.0.0.1:8848
        namespace: ruoyi_test
        group: DEFAULT_GROUP
        username: nacos
        password: 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-test
  profiles:
    # 环境配置
    active: dev
  cloud:
    nacos:
      discovery:
        # 服务注册地址
        server-addr: 127.0.0.1:8848
      config:
        # 配置中心地址
        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 ruoyi
  licenseUrl: 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 ruoyi
  licenseUrl: 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: 6666

spring:
  application:
    name: ruoyi-xxxx

# springdoc配置
springdoc:
  # 通过网关使用地址
  # gatewayUrl: http://localhost:8080/${spring.application.name}
  # 单独运行使用本机
  gatewayUrl: http://localhost:6666
  api-docs:
    # 是否开启接口文档
    enabled: true
  info:
    # 标题
    title: '测试接口文档'
    # 描述
    description: '测试接口描述'
    # 作者信息
    contact:
      name: RuoYi
      url: 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:6666
  api-docs:
    # 是否开启接口文档
    enabled: true
  info:
    # 标题
    title: '测试接口文档'
    # 描述
    description: '测试接口描述'
    # 作者信息
    contact:
      name: RuoYi
      url: 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.coloradmin.cn/o/2317639.html

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

相关文章

linux操作系统3

1.安装桌面的centos操作系统 二.linux相对路径和绝对路径 1.相对路径:从当前目录开始数的不完整路径 2.绝对路径:从跟开始数的完整路径 (这2种路径主要是为了方便用户操作) 3.linux用户和用户组管理 创建用户组:useradd 删除用户:userdel 用户的修改:usermod(可以修改用…

windows创建开机启动任务

1、背景 一个java应用程序&#xff0c;需要做成开机启动&#xff0c;系统为windows系统。 2、创建启动脚本 创建一个 .bat 文件&#xff08;例如 startup.bat&#xff09;&#xff0c;并将其保存到 Java 应用程序的目录中&#xff08;如 E:\gitcode\mygit\learn\database\jdk2…

素数判定方法详解:从基础试除法到优化策略

素数是只能被1和自身整除的正整数。素数的判定是数论中的基础问题&#xff0c;也是算法竞赛中的常见考点。 一、知识点 素数的定义&#xff1a; 素数&#xff08;质数&#xff09;是大于1的自然数&#xff0c;且只能被1和自身整除。 试除法&#xff1a; 通过遍历从2到sqrt(n)​…

BFS,DFS带图详解+蓝桥杯算法题+经典例题

1.BFS和DFS的定义与实现方式 1.1 深度优先搜索&#xff08;DFS&#xff09; 基本概念&#xff1a;DFS 是一种用于遍历或搜索图或树的算法。它从起始节点开始&#xff0c;沿着一条路径尽可能深地探索下去&#xff0c;直到无法继续或者达到目标节点&#xff0c;然后回溯到上一个…

「清华大学、北京大学」DeepSeek 课件PPT专栏

你要的 这里都打包好啦&#xff0c;快快收藏起来&#xff01; 名称 链接 团队简介 类型 DeepSeek——从入门到精通 1️⃣ DeepSeek从入门到精通「清华团队」 清华大学新闻与传播学院 新媒体研究中心 元宇宙文化实验室 PPT课件 DeepSeek如何赋能职场应用? ——从提示语…

如何在 Github 上获得 1000 star?

作为程序员&#xff0c;Github 是第一个绕不开的网站。我们每天都在上面享受着开源带来的便利&#xff0c;我相信很多同学也想自己做一个开源项目&#xff0c;从而获得大家的关注。然而&#xff0c;理想很丰满&#xff0c;现实却是开发了很久的项目仍然无人问津。 最近&#x…

on-policy对比off-policy

目录 持续更新。。。 on-policy与off-policy的定义 Q-learning属于on-policy算法还是off-policy算法&#xff1f; 为什么off-policy适用于从离线经验或多种探索策略中学习&#xff0c;明明 On-policy 也可以基于探索学习的啊&#xff1f; 重要性权重方法 off-policy方法可…

基于SpringBoot+Vue的幼儿园管理系统+LW示例参考

1.项目介绍 系统角色&#xff1a;管理员、教师、普通用户功能模块&#xff1a;用户管理、教师管理、班级管理、幼儿信息管理、会议记录管理、待办事项、职工考核、请假信息、缴费信息、体检管理、资源管理、原料管理、菜品信息管理等技术选型&#xff1a;SpringBoot&#xff0…

案例5_3: 6位数码管静态显示

文章目录 文章介绍效果图仿真图复习知识&#xff1a;代码思考 文章介绍 第5章 学习数码管&#xff0c;使用6位数码管进行静态显示 效果图 仿真图 新建一个干净的5_3文件夹&#xff0c;用于存放新画的仿真图 除单片机最小系统外&#xff0c;新增3个元器件&#xff0c;分别是&…

Profinet转Modbus RTU/TCP以太网通讯处理器

Profinet转Modbus RTU/TCP以太网通讯处理器 在当今的工业自动化领域&#xff0c;各种通讯协议和标准层出不穷。 其中&#xff0c;Profinet和Modbus作为两种广泛应用的通讯协议&#xff0c;分别在不同的应用场景中发挥着重要作用。 然而&#xff0c;当需要将这两种协议进行转换…

3倍训练速度+40%显存节省!Mamba+Transformer 仅用一半时间,性能提升80%!

在人工智能领域&#xff0c;Mamba与Transformer的结合正在成为研究热点&#xff0c;为自然语言处理和多模态任务带来新的突破。 最新研究表明&#xff0c;通过将Mamba架构与Transformer的强大编码能力相结合&#xff0c;模型在处理复杂的多模态数据时的效率提升了50%&#xff…

春秋云境刷题1

CVE-2022-29464 靶标介绍&#xff1a; WSO2文件上传漏洞&#xff08;CVE-2022-29464&#xff09;是Orange Tsai发现的WSO2上的严重漏洞。该漏洞是一种未经身份验证的无限制任意文件上传&#xff0c;允许未经身份验证的攻击者通过上传恶意JSP文件在WSO2服务器上获得RCE。 Git…

台式机电脑组装---电源

台式机电脑组装—电源 22 33 主板供电是聚集了12V&#xff0c;5V,3.3V的24pin CPU供电的话主要是12V的44pin供电 44pin合并之后&#xff0c;就是8pin 55 SATA硬盘会使用饼io口取电&#xff0c;从电源获取12v,5v,3.3v的电 33

10-BST(二叉树)-建立二叉搜索树,并进行前中后遍历

题目 来源 3540. 二叉搜索树 - AcWing题库 思路 建立二叉搜索树&#xff08;注意传参时用到了引用&#xff0c;可以直接对root进行修改&#xff09;&#xff0c;同时进行递归遍历&#xff1b;遍历可以分前中后三种写&#xff0c;也可以用标志来代替合在一起。其余详见代码。…

蓝桥杯备考:贪心问题之淘淘摘苹果

这是淘淘摘苹果普通版&#xff0c;很可爱的一道题&#xff0c;我们不多陈述&#xff0c;直接上代码 #include <iostream> using namespace std; const int N 15; int a[N]; int main() {for(int i 1;i<10;i){cin >> a[i];}int x;cin >> x;x30;int cnt …

VSTO(C#)Excel开发 系列目录 含源码发布

初级代码游戏的专栏介绍与文章目录-CSDN博客 我的github&#xff1a;codetoys&#xff0c;所有代码都将会位于ctfc库中。已经放入库中我会指出在库中的位置。 这些代码大部分以Linux为目标但部分代码是纯C的&#xff0c;可以在任何平台上使用。 源码指引&#xff1a;github源…

Git使用和原理(3)

1.远程操作 1.1分布式版本控制系统 我们⽬前所说的所有内容&#xff08;⼯作区&#xff0c;暂存区&#xff0c;版本库等等&#xff09;&#xff0c;都是在本地&#xff01;也就是在你的笔记本或者 计算机上。⽽我们的 Git 其实是分布式版本控制系统&#xff01;什么意思呢&a…

博客图床 VsCode + PigGo + 阿里云OSS

关键字 写博客&#xff0c;图床&#xff0c;VsCode&#xff0c;PigGo&#xff0c;阿里云OSS 背景环境 我想把我在本地写的markdown文档直接搬到CSDN上和博客园上&#xff0c;但是图片上传遇到了问题。我需要手动到不同平台上传文件&#xff0c;非常耗费时间和经历。 为了解决…

C++之list类及模拟实现

目录 list的介绍 list的模拟实现 定义节点 有关遍历的重载运算符 list的操作实现 &#xff08;1&#xff09;构造函数 (2)拷贝构造函数 &#xff08;3&#xff09;赋值运算符重载函数 &#xff08;4&#xff09;析构函数和clear成员函数 &#xff08;5&#xff09;尾…

SwinTransformer 改进:添加DoubleAttention模块提升上下文语义提取能力

目录 1. DoubleAttention模块 2. SwinTransformer + DoubleAttention 3. 完整代码 Tips:融入模块后的网络经过测试,可以直接使用,设置好输入和输出的图片维度即可 1. DoubleAttention模块 DoubleAttention 是一种用于计算机视觉任务的注意力机制,旨在通过双重注意力机制…