Flowable-SpringBoot项目集成

news2024/9/22 23:31:08

在前面的介绍中,虽然实现了绘制流程图,然后将流程图存储到数据库中,然后从数据库中获取流程信息,并部署和启动流程,但是部署的流程绘制器是在tomcat中部署的,可能在部分的项目中,需要我们将流程设计器,设置到自己的项目中,这样部署项目就相当于部署了流程设计器,下面对SpringBoot项目集成flowable流程设计器进行简单介绍。

一、项目整合

在前面部署flowable-ui后可以看到,ui界面分为了任务应用程序、建模器应用程序、管理员应用程序和身份管理应用程序。

在这几个应用中,最重要的就是建模器应用程序(flowable-modeler),它主要是用来绘制流程图和流程定义信息,因此,在这里我们是在项目中集成了建模器应用程序,实现在自己的项目中使用flowable-ui官方的建模器具绘制流程图,并将其保存到mysql数据库中。

环境:flowable版本:6.7.2 MySQL版本:5.7

  1. 下载源码

在这里下载对应版本的flowable-ui的源码。

Release Flowable 6.7.2 release · flowable/flowable-engine · GitHub

6.7.2版本的源码:

flowable-engine-flowable-6.7.2.zip

  1. flowable引擎基础配置

由于是 spring-boot 项目,因此直接选择 flowable-spring-boot-starter,里面提供了齐全的 REST API

<!--Flowable的核心依赖-->
<dependency>
  <groupId>org.flowable</groupId>
  <artifactId>flowable-spring-boot-starter-process</artifactId>
  <version>${flowable.version}</version>
</dependency>
<dependency>
  <groupId>org.flowable</groupId>
  <artifactId>flowable-spring-boot-starter</artifactId>
  <version>${flowable.version}</version>
</dependency>
<dependency>
  <groupId>org.flowable</groupId>
  <artifactId>flowable-json-converter</artifactId>
  <version>${flowable.version}</version>
</dependency>
<dependency>
  <groupId>org.flowable</groupId>
  <artifactId>flowable-bpmn-layout</artifactId>
  <version>${flowable.version}</version>
</dependency>

添加yml配置:

# flowable config
flowable:
  # 关闭定时任务JOB
  async-executor-activate: true
  # 将databaseSchemaUpdate设置为true。当Flowable发现库与数据库表结构不一致时,会自动将数据库表结构升级至新版本。
  database-schema-update: true
  check-process-definitions: false
  db-history-used: true
  history-level: full

日志配置:

注意:Flowable 使用 SLF4J 作为内部日志框架,所以我们使用 log4j 作为 SLF4J 的实现

添加依赖:

<!--日志-->
<dependency>
  <groupId>org.slf4j</groupId>
  <artifactId>slf4j-api</artifactId>
  <version>1.7.21</version>
</dependency>
<dependency>
  <groupId>org.slf4j</groupId>
  <artifactId>slf4j-log4j12</artifactId>
  <version>1.7.21</version>
</dependency>

resource 目录下新建文件 log4j.properties

log4j.rootLogger=DEBUG, CA

log4j.appender.CA=org.apache.log4j.ConsoleAppender
log4j.appender.CA.layout=org.apache.log4j.PatternLayout
log4j.appender.CA.layout.ConversionPattern= %d{hh:mm:ss,SSS} [%t] %-5p %c %x - %m%n
  1. 集成 flowable-modeler 前端

这里为了方便我们开发,将官方的flowable-modeler前端项目直接集成到了后端中。

从刚刚下载的源码中获取flowable-modeler的statci文件,6.7.2版本的目录在:

flowable-engine-flowable-6.7.2\modules\flowable-ui\flowable-ui-modeler-frontend\src\main\resources

复制包中 resources\static 下所有前端代码文件,复制到我们自己的项目static 文件夹下,项目没有static就在resource目录下新建static文件夹。

添加依赖:

<!--通过下方的配置,加上官方源码中的静态文件,就可以将建模器应用程序集成到项目中-->
<dependency>
  <groupId>org.flowable</groupId>
  <artifactId>flowable-ui-modeler-rest</artifactId>
  <version>${flowable.version}</version>
  <exclusions>
    <exclusion>
      <groupId>org.mybatis</groupId>
      <artifactId>mybatis</artifactId>
    </exclusion>
  </exclusions>
</dependency>
<dependency>
  <groupId>org.flowable</groupId>
  <artifactId>flowable-ui-modeler-conf</artifactId>
  <version>${flowable.version}</version>
</dependency>
<dependency>
  <groupId>org.flowable</groupId>
  <artifactId>flowable-ui-modeler-logic</artifactId>
  <version>${flowable.version}</version>
</dependency>

<dependency>
  <groupId>org.liquibase</groupId>
  <artifactId>liquibase-core</artifactId>
  <version>4.4.0</version>
</dependency>

配置文件:

在新版本的flowable-modeler中,需要配置idm,身份认证的相关配置,因此,在配置文件中添加:

# flowable config
flowable:
  # 关闭定时任务JOB
  async-executor-activate: true
  # 将databaseSchemaUpdate设置为true。当Flowable发现库与数据库表结构不一致时,会自动将数据库表结构升级至新版本。
  database-schema-update: true
  check-process-definitions: false
  db-history-used: true
  history-level: full
  common:
    app:
      idm-url: http://localhost:8099/flowable-idm
      idm-admin:
        user: admin
        password: admin

自定义配置类:

DatabaseAutoConfiguration.java

Flowable 是基于 liquibase 进行数据库自动管理与追踪的,因此需要加一个 liquibase 的配置类(可以把org.flowable.ui.modeler.conf.DatabaseConfiguration下的复制下来改一改)

import liquibase.Liquibase;
import liquibase.database.Database;
import liquibase.database.DatabaseConnection;
import liquibase.database.DatabaseFactory;
import liquibase.database.jvm.JdbcConnection;
import liquibase.exception.DatabaseException;
import liquibase.resource.ClassLoaderResourceAccessor;
import org.flowable.ui.common.service.exception.InternalServerErrorException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.sql.DataSource;

@Configuration
public class DatabaseAutoConfiguration {

    private static final Logger LOGGER = LoggerFactory.getLogger(DatabaseAutoConfiguration.class);

    protected static final String LIQUIBASE_CHANGELOG_PREFIX = "ACT_DE_";

    @Bean
    public Liquibase liquibase(DataSource dataSource) {
        LOGGER.info("Configuring Liquibase");
        Liquibase liquibase = null;
        try {
            DatabaseConnection connection = new JdbcConnection(dataSource.getConnection());
            Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(connection);
            database.setDatabaseChangeLogTableName(LIQUIBASE_CHANGELOG_PREFIX + database.getDatabaseChangeLogTableName());
            database.setDatabaseChangeLogLockTableName(LIQUIBASE_CHANGELOG_PREFIX + database.getDatabaseChangeLogLockTableName());

            liquibase = new Liquibase("META-INF/liquibase/flowable-modeler-app-db-changelog.xml", new ClassLoaderResourceAccessor(), database);
            liquibase.update("flowable");
            return liquibase;
        } catch (Exception e) {
            throw new InternalServerErrorException("Error creating liquibase database", e);
        } finally {
            closeDatabase(liquibase);
        }
    }

    private void closeDatabase(Liquibase liquibase) {
        if (liquibase != null) {
            Database database = liquibase.getDatabase();
            if (database != null) {
                try {
                    database.close();
                } catch (DatabaseException e) {
                    LOGGER.warn("Error closing database", e);
                }
            }
        }
    }
}

之后还需要添加mybatis-plus的相关配置:需要配置扫描 classpath:/META-INF/modeler-mybatis-mappings/*.xml

mybatis-plus:
  mapper-locations: classpath:/mapper/*Mapper.xml, classpath:/META-INF/modeler-mybatis-mappings/*.xml
  configuration:
    map-underscore-to-camel-case: true
    jdbc-type-for-null: null
  # 参数配置
  configuration-properties:
    # 配置流程引擎参数,详情可见 DatabaseConfiguration
    blobType: BLOB
    boolValue: TRUE
    # 不要设置库名,否则会出现双库名 bug
    prefix: ''

汉化配置:

StencilSetResource.java

在源码中找到这俩文件:

在resource下新建stencilset文件夹,将源码中的两个汉化文件放入该文件夹中。

添加类配置,在这里新建类的时候,名称不能为StencilSetResource,会与官方的jar包中的bean冲突,因此,我们新建FlowableStencilSetResource.java。

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.flowable.ui.common.service.exception.InternalServerErrorException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * 汉化 配置
 */
@RestController
@RequestMapping("/app")
public class FlowableStencilSetResource {

    private static final Logger LOGGER = LoggerFactory.getLogger(FlowableStencilSetResource.class);

    @Autowired
    protected ObjectMapper objectMapper;

    @RequestMapping(value = "/rest/stencil-sets/editor", method = RequestMethod.GET, produces = "application/json")
    public JsonNode getStencilSetForEditor() {
        try {
            JsonNode stencilNode = objectMapper.readTree(this.getClass().getClassLoader().getResourceAsStream("stencilset/stencilset_bpmn.json"));
            return stencilNode;
        } catch (Exception e) {
            LOGGER.error("Error reading bpmn stencil set json", e);
            throw new InternalServerErrorException("Error reading bpmn stencil set json");
        }
    }

    @RequestMapping(value = "/rest/stencil-sets/cmmneditor", method = RequestMethod.GET, produces = "application/json")
    public JsonNode getCmmnStencilSetForEditor() {
        try {
            JsonNode stencilNode = objectMapper.readTree(this.getClass().getClassLoader().getResourceAsStream("stencilset/stencilset_cmmn.json"));
            return stencilNode;
        } catch (Exception e) {
            LOGGER.error("Error reading bpmn stencil set json", e);
            throw new InternalServerErrorException("Error reading bpmn stencil set json");
        }
    }
}

SecurityUtils配置

注意因为源码中引用了这个类,因此我们在配置的时候,路径需要与源码中的路径保持一致,也就是:org.flowable.ui.common.security 这样在 Jar 中的方法在调用时会覆盖原 Jar 里的工具类

下方的类为6.7.2版本的配置,如果是低版本的配置,可能不同,在旧版本中,flowable使用了FlowableAppUser,但是在新版本的依赖中,转而是:SecurityScope,因此这个配置需要根据自己的flowable版本配置。

import java.util.ArrayList;
import java.util.List;
import org.flowable.common.engine.api.FlowableIllegalStateException;
import org.flowable.idm.api.User;
import org.flowable.ui.common.model.RemoteUser;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
 
/**
 * 重构流程编辑器获取用户信息
 */
public class SecurityUtils {
 
  private static User assumeUser;
  
  private static SecurityScopeProvider securityScopeProvider = new FlowableSecurityScopeProvider();
 
  private SecurityUtils() {
  }
 
  /**
   * Get the login of the current user.
   */
  public static String getCurrentUserId() {
    User user = getCurrentUserObject();
    if (user != null) {
      return user.getId();
    }
    return null;
  }
 
  /**
   * @return the {@link User} object associated with the current logged in user.
   */
  public static User getCurrentUserObject() {
    if (assumeUser != null) {
      return assumeUser;
    }
 
    RemoteUser user = new RemoteUser();
    user.setId("admin");
    user.setDisplayName("admin");
    user.setFirstName("admin");
    user.setLastName("admin");
    user.setEmail("admin@flowable.com");
    user.setPassword("123456");
    List<String> pris = new ArrayList<>();
    pris.add(DefaultPrivileges.ACCESS_MODELER);
    pris.add(DefaultPrivileges.ACCESS_IDM);
    pris.add(DefaultPrivileges.ACCESS_ADMIN);
    pris.add(DefaultPrivileges.ACCESS_TASK);
    pris.add(DefaultPrivileges.ACCESS_REST_API);
    user.setPrivileges(pris);
    return user;
  }
  
    public static void setSecurityScopeProvider(SecurityScopeProvider securityScopeProvider) {
        SecurityUtils.securityScopeProvider = securityScopeProvider;
    }
 
    public static SecurityScope getCurrentSecurityScope() {
        SecurityContext securityContext = SecurityContextHolder.getContext();
        if (securityContext != null && securityContext.getAuthentication() != null) {
            return getSecurityScope(securityContext.getAuthentication());
        }
        return null;
    }
 
    public static SecurityScope getSecurityScope(Authentication authentication) {
        return securityScopeProvider.getSecurityScope(authentication);
    }
 
    public static SecurityScope getAuthenticatedSecurityScope() {
        SecurityScope currentSecurityScope = getCurrentSecurityScope();
        if (currentSecurityScope != null) {
            return currentSecurityScope;
        }
        throw new FlowableIllegalStateException("User is not authenticated");
    }
 
  public static void assumeUser(User user) {
    assumeUser = user;
  }
 
  public static void clearAssumeUser() {
    assumeUser = null;
  }
}

认证请求配置

前端 url-config.js 修改

路径:resource\static\scripts\configuration\url-conf.js

将 getAccountUrl 的路径改为上面自己的 getAccount 接口的路径,我们让他使用我们自己的认证

后端添加Controller

添加一个登录认证的FlowModelerController


/**
 * flowable-modeler获取默认的管理员信息
 *
 * @Author: yichangqiao
 * @Date: 2024/4/19 16:11
 */
@Slf4j
@RestController
public class FlowModelerController {

    /**
     * 获取默认的管理员信息
     * @return
     */
    @RequestMapping(value = "/flow/rest/account", method = RequestMethod.GET, produces = "application/json")
    public UserRepresentation getAccount() {
        UserRepresentation userRepresentation = new UserRepresentation();
        userRepresentation.setId("admin");
        userRepresentation.setEmail("admin@flowable.org");
        userRepresentation.setFullName("Administrator");
        userRepresentation.setLastName("Administrator");
        userRepresentation.setFirstName("Administrator");
        List<String> privileges = new ArrayList<>();
        privileges.add(DefaultPrivileges.ACCESS_MODELER);
        privileges.add(DefaultPrivileges.ACCESS_IDM);
        privileges.add(DefaultPrivileges.ACCESS_ADMIN);
        privileges.add(DefaultPrivileges.ACCESS_TASK);
        privileges.add(DefaultPrivileges.ACCESS_REST_API);
        userRepresentation.setPrivileges(privileges);
        log.info("login init success ..... ");
        return userRepresentation;
    }
}

mybatis-plus配置

因为flowable自己使用了一个sqlsessionfactory创建SQL会话,但是我们自己的项目中又需要使用mybatis-plus的sqlsessionfactory,在mybatis-plus加载sqlsessionfactory默认是单例的,因此我们需要配置默认的回话连接:

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@MapperScan(basePackages = {"com.flowable.mapper"},
        sqlSessionFactoryRef = "sqlSessionFactory",
        sqlSessionTemplateRef = "sqlSessionTemplate")
public class MybatisPlusConfig {
    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor() {
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
        return interceptor;
    }
}

配置security

这里我们需要跳过flowable的权限校验,而是使用我们自己的认证框架,因此,需要在项目中配置:

import org.flowable.ui.common.security.SecurityConstants;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

@Configuration
public class SecurityConfiguration {

    @Configuration(proxyBeanMethods = false)//所以这个地方-1让该配置项在FlowableUiSecurityAutoConfiguration中对应配置项前加载,以跳过授权
    @Order(SecurityConstants.FORM_LOGIN_SECURITY_ORDER - 1)
    public static class FormLoginWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter {
        @Override
        protected void configure(HttpSecurity http) throws Exception {
            http
                    //必须要将csrf设置为disable,不然后面发送POST请求时会报403错误
                    .csrf().disable()
                    //为了简单起见,简单粗暴方式直接放行modeler下面所有请求
                    .authorizeRequests().antMatchers("/**").permitAll();
        }
    }

}

修改Application启动类配置

让spring加载我们自定义的配置bean:FlowableStencilSetResource.class、DatabaseAutoConfiguration.class

import com.yichangqiao.flowable.config.DatabaseAutoConfiguration;
import com.yichangqiao.flowable.config.FlowableStencilSetResource;
import lombok.extern.slf4j.Slf4j;
import org.flowable.ui.common.security.ApiHttpSecurityCustomizer;
import org.flowable.ui.common.security.FlowableUiSecurityAutoConfiguration;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;
import java.time.LocalDateTime;

@Slf4j
//启用全局异常拦截器
@Import(value = {
        FlowableStencilSetResource.class,
        // 引入 DatabaseConfiguration 表更新转换,
        DatabaseAutoConfiguration.class
})
@ComponentScan(basePackages = {"com.flowable.*"})
@SpringBootApplication(exclude = {SecurityAutoConfiguration.class})
public class MasterYiFlowableApplication {

    public static void main(String[] args) {
        SpringApplication.run(MasterYiFlowableApplication.class, args);
        log.info("flowable模块加载成功 ================> {}", LocalDateTime.now());
    }

}

启动项目

启动项目后,访问项目地址:127.0.0.1:端口,就可以访问到我们本地项目中的flowable-modeler了。

三、结语

实际整合过程中,可能存在版本、环境、依赖等影响,导致出现报错,但是大体的思路如上,可以参考整合。

下一节:flowable-整合系统角色人员 Flowable-整合系统角色人员-CSDN博客

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

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

相关文章

微信小程序数组绑定使用案例(一)

微信小程序数组绑定案例&#xff0c;修改数组中的值 1.Wxml 代码 <view class"list"><view class"item {{item.ischeck?active:}}" wx:for"{{list}}"><view class"title">{{item.name}} <text>({{item.id}…

武忠祥李永乐强化笔记

高等数学 函数 极限 连续 函数 复合函数奇偶性 f[φ(x)]内偶则偶&#xff0c;内奇则同外 奇函数 ln ⁡ ( x 1 x 2 ) \ln(x \sqrt{1 x^{2}}) ln(x1x2 ​) 单调性 一点导数>0不能得出邻域单调增&#xff0c;加上导函数连续则可以得出邻域单调增 极限 等价无穷小…

达梦数据库的系统视图v$utsk_info

达梦数据库的系统视图v$utsk_info 查询守护进程向服务器发送请求的执行情况。 升级到 V3.0 版本后&#xff0c;此视图仅用于查看当前服务器的命令执行情况&#xff0c;在 CMD 字段值不为 0 时&#xff0c;说明是有效的命令信息&#xff1b;此时如果 CODE 字段值是 100&#xf…

202495读书笔记|《红楼梦(插图本)(童年书系·书架上的经典)》——荣辱自古周而复始,岂是人力所能保的?

202495读书笔记|《红楼梦&#xff08;插图本&#xff09;&#xff08;童年书系书架上的经典&#xff09;》——荣辱自古周而复始&#xff0c;岂是人力所能保的&#xff1f; 摘录人物关系&#xff1a; 《红楼梦&#xff08;插图本&#xff09;&#xff08;童年书系书架上的经典&…

02互联网行业的产品方向(2)

数字与策略产品 大数据时代&#xff0c;数据的价值越来越重要。大多数公司开始对内外全部数据进行管理与挖掘&#xff0c;将业务数据化&#xff0c;数据资产化&#xff0c;资产业务化&#xff0c;将数据产品赋能业务&#xff0c;通过数据驱动公司业务发展&#xff0c;支撑公司战…

学习周报:文献阅读+Fluent案例+水动力学方程推导

目录 摘要 Abstract 文献阅读&#xff1a;物理信息神经网络学习自由表面流 文献摘要 讨论|结论 预备知识 浅水方程SWE&#xff08;Shallow Water Equations&#xff09; 质量守恒方程&#xff1a; 动量守恒方程&#xff1a; Godunov通量法&#xff1a; 基本原理&…

嵌入式Linux学习: platform 设备驱动实验

在Linux中&#xff0c;Platform&#xff08;平台&#xff09;机制是一个重要的设备驱动管理框架&#xff0c;它主要在Linux 2.6内核及以后的版本中引入。Platform机制的主要目的是提供一种统一的方式来管理那些不直接挂靠在传统物理总线&#xff08;如USB、PCI、I2C、SPI等&…

单链表的应用(3)

返回倒数第k个结点 实现一种算法&#xff0c;找出单向链表中倒数第 k 个节点。返回该节点的值。 思路&#xff1a; 利用快慢指针&#xff0c;先让快指针走k步快慢指针一起往后遍历&#xff0c;直到快指针到达链表的末端此时的慢指针就是链表的倒数第k个结点 int kthToLast(…

昇思MindSpore学习总结十六 —— 基于MindSpore的GPT2文本摘要

1、mindnlp 版本要求 !pip install tokenizers0.15.0 -i https://pypi.tuna.tsinghua.edu.cn/simple # 该案例在 mindnlp 0.3.1 版本完成适配&#xff0c;如果发现案例跑不通&#xff0c;可以指定mindnlp版本&#xff0c;执行!pip install mindnlp0.3.1 !pip install mindnlp …

提供代码!直接可以运行,Chatgpt代码分享

效果演示 安装依赖库 pip install openai粘贴如下代码 # 设置 API Key import openaiopenai.api_key "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"# 设置请求参数model_engine "text-davinci-002"prompt "python的应用领域"comp…

Bonree ONE赋能汽车行业 重塑可观测性体验

随着数字化、智能化浪潮的汹涌而至&#xff0c;全球汽车产业正站在一个崭新的历史起点上。新能源汽车&#xff0c;作为这场科技革命和产业变革的领跑者&#xff0c;其数智化发展正呈现出前所未有的蓬勃态势。7月18-19日&#xff0c;第四届中国新能源汽车产业数智峰会于上海举办…

《0基础》学习Python——第二十三讲__网络爬虫/<6>爬取哔哩哔哩视频

一、在B站上爬取一段视频&#xff08;B站视频有音频和视频两个部分&#xff09; 1、获取URL 注意&#xff1a;很多平台都有反爬取的机制&#xff0c;B站也不例外 首先按下F12找到第一条复制URL 2、UA伪装&#xff0c;下列图片中&#xff08;注意代码书写格式&#xff09; 3、Co…

【2024】springboot O2O生鲜食品订购

博主介绍&#xff1a;✌CSDN新星计划导师、Java领域优质创作者、掘金/华为云/阿里云/InfoQ等平台优质作者、专注于Java技术领域和学生毕业项目实战,高校老师/讲师/同行前辈交流✌ 技术范围&#xff1a;SpringBoot、Vue、SSM、HTML、Jsp、PHP、Nodejs、Python、爬虫、数据可视化…

sass版本更新,不推荐使用嵌套规则后的声明

目前在 Sass 中不推荐使用嵌套规则后的声明&#xff0c;在 为了通知用户即将进行的更改&#xff0c;并给他们时间进行更改 与之兼容的样式表。在未来的版本中&#xff0c;Dart Sass 将更改为 匹配纯 CSS 嵌套生成的顺序。Deprecation Warning: Sasss behavior for declarations…

视频点播项目

文章目录 视频点播技术栈与项目环境JsonCppMariaDBhttplib 工具类设计文件类Json类 数据管理模块视频信息管理&#xff08;数据表设计&#xff09;数据管理类设计 网络通信接口设计业务处理模块设计前端界面主页面播放页面 项目总结项目回顾项目结构关键技术点总结 视频点播 允…

el-table表头使用el-dropdown出现两个下拉框

问题描述&#xff1a;el-table在固定右边列时&#xff0c;表头使用el-dropdown会出现两个下拉框&#xff0c;如图所示&#xff1a; 解决方法&#xff1a; 1.只显示第一个下拉框&#xff0c;通过控制样式将其他的下拉框display:none; 2.如图所示&#xff0c;修改插槽写法&…

SpringBoot源码深度解析

今天&#xff0c;聊聊SpringBoot的源码&#xff0c;本博客聊的版本为v2.0.3.RELEASE。目前SpringBoot的最新版为v3.3.2&#xff0c;可能目前有些公司使用的SpringBoot版本高于我这个版本。但是没关系&#xff0c;因为版本越新&#xff0c;新增的功能越多&#xff0c;反而对Spri…

如何将几百兆的包优化到几十兆----记一次vue项目的打包优化过程

打包优化 现象 前段时间开发的时候遇到客户反馈的一个问题 界面无法打开&#xff0c;显示白屏&#xff0c;控制台无报错 经过我们在开发环境&#xff0c;测试环境反复测试都没复现出客户的问题&#xff0c;然后我们又不停的在生产环境上找问题&#xff0c;也没复现出来 最…

一文带你读懂MLIR论文,理解MLIR设计准则.

论文MLIR: Scaling Compiler Infrastructure for Domain Specific Computation MLIR&#xff1a;针对特定领域计算扩展编译器基础设施 文章目录 论文MLIR: Scaling Compiler Infrastructure for Domain Specific Computation1. 论文下载2. TVM关于MLIR的讨论3. 论文正文0. 摘要…

5个人人都应该学会的电脑小技巧

今天分享几个电脑常用的快捷键&#xff0c;可以让你的工作事半功倍&#xff0c;建议收藏&#xff01; 不想被突然来的人看到正在浏览的网站&#xff0c;用CtrlW或者AltF4可以关闭当前页面&#xff0c;另外如果你正在看小电影也可以用这个办法关闭。 2. 同事或大Boos走了之后想…