SpringBoot+Vue+EasyExcel+MybatisPlus+Lombok前后端分离实现Excel文件导入导出(简单实用版)

2023-05-16

一、前言

  文章参考自两位大佬的博客:

  http://events.jianshu.io/p/4242556280fa

  https://www.w3xue.com/exp/article/20228/80302.html

  我在此基础上做了补充说明,以及把实践的注意事项说明清楚!

  在此特别声明,若原作者认为我存在侵权行为,可联系我删除文章!!此文章仅用于学习,禁止商用转载!!!

二、准备

2.1、后端

(1)导入EasyExcel、MybatisPlus、Lombok依赖:

		<!-- easyexcel -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>easyexcel</artifactId>
            <version>3.1.1</version>
        </dependency>
        <!--MybatisPlus-->
		<dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-boot-starter</artifactId>
            <version>3.0.5</version>
        </dependency>
        <!--模板引擎,用于MybatisPlus代码自动生成-->
        <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity-engine-core</artifactId>
            <version>2.0</version>
        </dependency>
        <!--Lombok-->
		<dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>        

(2)在build中配置Maven文件过滤:

<!--maven静态资源文件过滤问题-->
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                    <include>**/*.yml</include>
                </includes>
                <filtering>false</filtering>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                    <include>**/*.yml</include>
                </includes>
                <filtering>false</filtering>
            </resource>
        </resources>

(3)在application.yml中配置上传文件的大小和MybatisPLus的Mapper文件地址:

spring:
# 上传文件大小设置
  servlet:
    multipart:
      #设置单个文件大小,单位MB和KB都可以
      max-file-size: 100MB
      #设置总上传的数据大小,单位MB和KB都可以
      max-request-size: 100MB

mybatis-plus:
  # 配置日志默认输出到控制台,因为Sql语句不可见,要查看日志才可见执行情况
  configuration:
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  # 配置逻辑删除
  global-config:
    db-config:
      logic-delete-value: 1
      logic-not-delete-value: 0
    #xml文件位置
  mapper-locations: classpath:com/tang/mapper/xml/*.xml

(4)配置前后端跨域问题,一个Springboot的配置文件:

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class CorsConfig implements WebMvcConfigurer {

    @Override
    public void addCorsMappings(CorsRegistry registry) {  //解决springboot和ajax传数据时请求跨域的问题
        registry.addMapping("/**")
                .allowedHeaders("*")
                .allowedMethods("GET", "HEAD", "POST", "PUT", "DELETE","OPTIONS")
                .allowedOrigins("*")
                .allowCredentials(true)
                .maxAge(3600);
        WebMvcConfigurer.super.addCorsMappings(registry);
    }

}

2.2、前端

(1)安装element-ui,控制台执行:

cnpm install element-ui --save

main.js中配置全局使用:

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

Vue.use(ElementUI);

new Vue({
  el: '#app',  //针对app元素使用element-ui
  render: h => h(App)  //element-ui
})

三、Excel文件导入数据库

  1、对于大的Excel文件,需要将行数据分批解析成POJO对象,并写入数据库,避免全量加载占用过多内存。

  2、插入数据库时,尽量用批量插入的方式,而不是多次调用单条插入的方式,减少网络开销,提高插入效率。

  基于上述两个原则,代码实现如下,示例中的POJO是Consumer。

  注意:本功能实现没有经过Service层。

3.1、定义POJO并给字段添加必要的注解

  1、@ExcelProperty指定POJO的字段与Excel列的对应关系,列名由value指定(value为表头名称,index为表头位置)。

  2、@ExcelIgnore表示Excel导入导出的时候忽略该字段。

  3、如果POJO中的字段和Excel中的列值之间存在差异,需要转换时,可以自定义转换器,并通过converter指定(具体实现参考下文)。

package com.tang.pojo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.tang.excel.GenderConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author 唐世华
 * @since 2023-03-30
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class Consumer implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @ExcelProperty(value = "ID", index = 0)
    private Integer id;

    @ExcelProperty(value = "用户名", index = 1)
    private String aaaa;

    @ExcelProperty(value = "密码", index = 2)
    private String password;

    @ExcelProperty(value = "性别", index = 3, converter = GenderConverter.class)
    private Integer sex;

    @ExcelProperty(value = "手机号码", index = 4)
    private String phone;


}

  补充1:用lombok的同志注意,不要在实体类上使用链式编程的注解:@Accessors(chain = true)easyexcellombok会有冲突,导致获取的数据为null

  补充2:不要使用Mysql的关键字作为数据表的字段名,否则会报错

3.2、实现批量插入接口

  为了实现通用的Excel导入工具,本文设计了一个批量插入接口,用于批量插入数据到数据库,而非多次逐条插入。

(1)批量插入接口:

import java.util.List;

/**
 * 批量插入的Mapper, 用xml配置文件自定义批量插入,
 * 避免MyBatis的逐条插入降低性能
 *
 * @param <T>
 * @author 唐世华
 * @date 2023-03-31
 */
//<T>是Java中的泛型
public interface BatchInsertMapper<T> {
    void batchInsert(List<T> list);
}

(2)Mapper层接口ConsumerMapper继承BatchInsertMapper

import com.tang.excel.BatchInsertMapper;
import com.tang.pojo.Consumer;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 唐世华
 * @since 2023-03-30
 */
@Mapper
public interface ConsumerMapper extends BaseMapper<Consumer>, BatchInsertMapper<Consumer> {

}

(3)在ConsumerMapper.xml中编写批量插入Sql语句:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.tang.mapper.ConsumerMapper">
    <insert id="batchInsert" parameterType="list">
        insert into excel.consumer
        (aaaa, password, sex, phone)
        values
        <foreach collection="list" item="item" index="index" separator=",">
            (
             #{item.aaaa},
             #{item.password},
             #{item.sex},
             #{item.phone}
            )
        </foreach>
    </insert>
</mapper>

3.3、自定义Excel的类型转换器,实现性别转换

  在Consumer中,我们用1,0表示男,女;但是在Excel文件中,用汉字 “男” 和 “女” 替代1和0,所以需要进行转换。

import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.converters.ReadConverterContext;
import com.alibaba.excel.converters.WriteConverterContext;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.data.WriteCellData;

/**
 * Excel性别列对应的转换器
 *
 * @author 唐世华
 * @date 2023-03-31
 */
public class GenderConverter implements Converter<Integer> {
    @Override
    public Class<?> supportJavaTypeKey() {
        return Integer.class;
    }

    @Override
    public CellDataTypeEnum supportExcelTypeKey() {
        return CellDataTypeEnum.STRING;
    }

    /**
     * 这里读的时候会调用,将Excel中的字段汉字转换成Java的Integer对象
     *
     * @param context context
     * @return Java中的Integer对象
     */
    @Override
    public Integer convertToJavaData(ReadConverterContext<?> context) {
        return context.getReadCellData().getStringValue().equals("男") ? 1 : 0;
    }

    /**
     * 这里是写的时候会调用,将Java的Integer对象转换成Excel中的字符串
     *
     * @return Excel中要存储的字符串
     */
    @Override
    public WriteCellData<?> convertToExcelData(WriteConverterContext<Integer> context) {
        String gender = context.getValue() == 1 ? "男" : "女";
        return new WriteCellData<String>(gender);
    }
}

3.4、继承ReadListener接口,实现Excel分批导入

  1、分批入库,避免整个Excel文件加载到内存,影响性能。

  2、invoke()用于处理Excel中一行解析形成的POJO对象,解析过程由EasyExcel根据POJO字段上的注解自动完成。

  3、doAfterAllAnalysed()invoke()方法处理完整个Sheet中的所有数据之后调用,本文中用于将最后一批缓存的数据入库。

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import lombok.extern.slf4j.Slf4j;

import java.util.ArrayList;
import java.util.List;

/**
 * 从Excel文件流中分批导入数据到库中
 * EasyExcel参考文档:https://easyexcel.opensource.alibaba.com/docs/current/api/
 *
 * @param <T>
 * @author 唐世华
 * @date 2023-03-31
 */

@Slf4j
public abstract class ExcelImportListener<T> implements ReadListener<T> {

    /**
     * 缓存大小,100条数据写入一次数据库
     */
    private static final int BATCH_SIZE = 100;

    /**
     * 缓存数据,用来存储缓存数据()
     */
    private List<T> cacheList = new ArrayList<>(BATCH_SIZE);

    /*
    * po:从excel中解析一行得到的实体类(pojo)
    * */
    @Override
    public void invoke(T po, AnalysisContext analysisContext) {
        System.out.println(po);
        cacheList.add(po);
        if (cacheList.size() >= BATCH_SIZE) {
            log.info("完成一批Excel记录的导入,条数为:{}", cacheList.size());
            getMapper().batchInsert(cacheList);
            cacheList = new ArrayList<>(BATCH_SIZE);
        }
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {
        getMapper().batchInsert(cacheList);
        log.info("完成最后一批Excel记录的导入,条数为:{}", cacheList.size());
    }

    /**
     * 获取批量插入的Mapper
     * @return 批量插入的Mapper
     */
    protected abstract BatchInsertMapper<T> getMapper();

}

3.5、使用EasyExcel实现文件导入

  1、head()指定Excel行对应的POJO,本文是Consumer。

  2、registerReadListener()指定处理解析到的Consumer的类,本文是我们2.3中实现的ExcelImportListener

  3、通过实现匿名内部类的方式,将consumerMapper传递给ExcelImportListener,用于批量插入。

import com.alibaba.excel.EasyExcel;
import com.tang.mapper.ConsumerMapper;
import com.tang.pojo.Consumer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import java.io.IOException;

/**
 * Excel导入组件
 *
 * @author 唐世华
 * @date 2023-03-31
 */
@Slf4j
@Component
public class ExcelComponent {

    @Resource
    private ConsumerMapper consumerMapper;

    /**
     * Excel文件分批导入数据库
     *
     * @param file 上传的文件
     * @throws IOException 读取文件异常
     */
    public void importConsumerFile(@RequestParam("file") MultipartFile file) throws IOException {
        EasyExcel.read(file.getInputStream())
                .head(Consumer.class)
                .registerReadListener(new ExcelImportListener<Consumer>() {
                    @Override
                    protected BatchInsertMapper<Consumer> getMapper() {
                        return consumerMapper;
                    }
                }).sheet().doRead();
    }
}

3.6、后端Controller层调用

import com.alibaba.excel.EasyExcel;
import com.tang.excel.ExcelComponent;
import com.tang.excel.ExcelExportHandle;
import com.tang.pojo.Consumer;
import com.tang.service.ConsumerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 唐世华
 * @since 2023-03-30
 */
@RestController
@RequestMapping("/consumer")
public class ConsumerController {

    @Resource
    private ExcelComponent excelComponent;

    @PostMapping("/updown")
    public Boolean updown(@RequestParam("files") MultipartFile file) throws IOException{
        excelComponent.importConsumerFile(file);
        return true;
    }

}

3.7、前端代码实现

(1)accept:接受的文件类型,name:和后端RequestParam中的名字对应。

		<el-upload
            class="upload-demo"
            method="post"
            action="http://localhost:8888/consumer/updown"
            accept=".xlsx,.xls"
            :show-file-list="false"
            name="file"
        >
            <el-button type="primary">导入</el-button>
        </el-upload>

四、数据库数据导出为Excel(下载功能)

  导出也会用到导入阶段定义的POJO和Converter,此处不再赘述。

4.1、实现Excel导出组件

  1、 泛型实现,通用性更好。

  2、设置单元格长宽,字体,执行文件名。

  3、设置Response响应头,以实现Excel文件的下载和中文文件名的支持。

import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.write.metadata.style.WriteCellStyle;
import com.alibaba.excel.write.metadata.style.WriteFont;
import com.alibaba.excel.write.style.HorizontalCellStyleStrategy;
import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.springframework.http.HttpHeaders;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletResponse;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.List;

/**
 * 将数据以Excel的格式写入输出流
 * EasyExcel参考文档:https://easyexcel.opensource.alibaba.com/docs/current/api/write
 *
 * @author 唐世华
 * @date 2023-03-31
 */
@Slf4j
@Component
public class ExcelExportHandle {

    /**
     * 下载Excel格式的数据
     *
     * @param response response
     * @param fileName 文件名(支持中文)
     * @param data     待下载的数据
     * @param clazz    封装数据的POJO
     * @param <T>      数据泛型
     */

    public <T> void export(HttpServletResponse response, String fileName,
                           List<T> data, Class<T> clazz) {
        try {
            response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
            response.setCharacterEncoding("utf-8");
            // 这里URLEncoder.encode可以防止中文乱码
            String encodedFileName = URLEncoder.encode(fileName, StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20");
            response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename*=utf-8''" + encodedFileName + ".xlsx");
            // 这里需要设置不关闭流
            EasyExcel.write(response.getOutputStream(), clazz)
                    .sheet("Sheet1")
                    // 设置单元格宽度自适应
                    .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy())
                    // 设置单元格高度和字体
                    .registerWriteHandler(getHeightAndFontStrategy())
                    .doWrite(data);
            log.info("下载{}条记录到文件{}", data.size(), fileName);
        } catch (Exception e) {
            // 重置response
            log.error("文件下载失败" + e.getMessage());
            throw new RuntimeException("下载文件失败", e);
        }
    }

    /**
     * 自定义Excel导出策略,设置表头和数据行的字体和高度
     *
     * @return Excel导出策略
     */
    private HorizontalCellStyleStrategy getHeightAndFontStrategy() {
        WriteCellStyle headWriteCellStyle = new WriteCellStyle();
        WriteFont headWriteFont = new WriteFont();
        headWriteFont.setFontHeightInPoints((short) 11);
        headWriteFont.setBold(true);
        headWriteCellStyle.setWriteFont(headWriteFont);
        WriteCellStyle contentWriteCellStyle = new WriteCellStyle();
        WriteFont contentWriteFont = new WriteFont();
        contentWriteFont.setFontHeightInPoints((short) 11);
        contentWriteCellStyle.setWriteFont(contentWriteFont);
        contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);
        return new HorizontalCellStyleStrategy(headWriteCellStyle, contentWriteCellStyle);
    }

}

4.2、后端Controller层调用

import com.alibaba.excel.EasyExcel;
import com.tang.excel.ExcelComponent;
import com.tang.excel.ExcelExportHandle;
import com.tang.pojo.Consumer;
import com.tang.service.ConsumerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 唐世华
 * @since 2023-03-30
 */
@RestController
@RequestMapping("/consumer")
public class ConsumerController {

    @Autowired
    private ConsumerService consumerService;

    @Resource
    private ExcelExportHandle excelExportHandle;

    @GetMapping("/down2")
    public void down2(HttpServletResponse response){
    	//从数据库中取出导出的数据
        List<Consumer> list = consumerService.list(null);
        System.out.println(list);
        excelExportHandle.export(response, "用户表", list, Consumer.class);
    }

}

4.3、前端代码实现

<template>
    <div>
        <el-button type="primary" style="margin-top: 20px" @click="downLoad">导出</el-button>
    </div>
</template>

<script>
export default {
    name: "ExcelPage",
    methods: {
        downLoad() {  //导出excel文件
            window.location.href='http://localhost:8888/consumer/down2';
            this.$message.success("导出成功");
        }
    }
}
</script>

五、总结

  可能有些同学觉得我写的文章大多数的地方都和参考的博文一样,你这不是抄袭吗?

  我这里来回答一下这个问题。我觉得我自己总结的没有参考的文章总结的好,与其用自己写的不好的话,我宁愿用其他博主总结的话,我想我这也是在帮助他们传播文章了。

  我在原有内容的基础上,把自己所踩的坑都给写上来了,新加入的内容都和我踩的坑有关,所以你们直接使用一般来说是没有Bug的。我还加入了前端如何调用后端的内容,算是改善且发扬光大吧。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

SpringBoot+Vue+EasyExcel+MybatisPlus+Lombok前后端分离实现Excel文件导入导出(简单实用版) 的相关文章

  • ROS入门-9.订阅者Subscriber的编程实现

    还是通过海龟仿真器去发布数据 xff0c 要实现一个订阅者来订阅海龟的位置信息等 xff0c publisher是海龟仿真器 xff0c subcriber即为这次我们要实现的程序 数据传输为从publisher传向subscriber 一
  • javascript类型转换(上篇)

    前言 JavaScript中有6种数据类型 xff1a 数字 xff08 number xff09 字符串 xff08 string xff09 布尔值 xff08 boolean xff09 undefined null 对象 xff08
  • Opencv Jetson运行失败

    目录 1 问题 xff1a 2 环境 3 代码 3 怀疑方向 4 方向错误 xff08 新现象 xff09 1 问题 xff1a 在一个大型的项目里面 xff0c 使用了opencv xff0c 且自己编译的时候添加了opencv cuda
  • c与c++的区别

    文章目录 前言c和c 43 43 的区别有很多 xff0c 首先我们需要先搞定c 43 43 xff0c 43 43 的是什么 xff0c 43 43 的是STL库也就是模板库 xff0c 面向对象编程 xff0c 也就是类与对象 xff0
  • 使用Xmanager 7连接centos7远程桌面

    有时候使用命令行在服务器上进行一些操作真的很不方便 xff0c 所以我就想搞个图形界面来解决一些不好操作的事情 一 客户端下载安装Xmanager 7 https www xshellcn com 二 服务器端进行如下操作 1 安装epel
  • MSP430F5529 入门心得

    2021年全国大学生电子设计竞赛因为疫情而推迟了 xff0c 因为电赛里必有一道题目是要使用TI的处理器而之前用习惯了STM32系列处理器没有使用过TI的板子 xff0c 就拿实验室现有的TI的板子MSP4305529LP学习 xff0c
  • 07-输入输出系统

    IO系统基本概念 大纲已删 I O控制方式简介 I O控制器多种多样 xff0c 也会制定相应的标准 xff0c 如 用于控制uSB设备的I O接口 用于控制SATA 3 0硬盘的I O接口等 I O控制器就是一块芯片 xff09 常被集成
  • 哈希算法原理和实现

    哈希算法原理和实现 前言 当我们在编程过程中 xff0c 往往需要对线性表进行查找操作 在顺序表中查找时 xff0c 需要从表头开始 xff0c 依次遍历比较a i 与key的值是否相等 xff0c 直到相等才返回索引i xff1b 在有序
  • Jenkins 安装

    Jenkins 安装 WAR 文件安装 JenkinsWindows 安装 Jenkins 安装 Jenkins启动 jenkins Debian Ubuntu 安装 Jenkins 安装 Jenkins启动 jenkins Redhat
  • MySql错误1251 - Client does not support authentication protocol requested by server 解决方案

    这是一个简单的权限与安全问题 只需要在 MySQL Shell 中输入两行简单的命令就可以解决问题 从安装目录进入mysql xff0c 找到安装目录 xff0c 点击上面的安装目录 xff0c 输入cmd xff0c 回车 xff0c 进
  • 初学Linux Vim时遇到的坑,为什么操作:wq 无法保存和退出

    Vim是Linux常用的文本编辑器 vim的操作 1 输入命令 vi 文件名 xff0c 进入文本编辑页面 2 输入 a 或者 i 可以编辑内容 3 点击Esc 退出命令模式 4 输入 xff1a wq 保存并退出 xff0c 记得别漏了冒
  • 将tensor转换为numpy

    将tensor转换为numpy span class token keyword import span tensor span class token keyword import span numpy span class token
  • OpenStack配置网络并安装且配置控制器节点

    OpenStack配置网络 右击以管理员模式启动 点击编辑 xff0c 选择启动启动虚拟网络编辑器 如上图所示 xff0c 如果出现桥接模式则是操作正确 下面进入虚拟机中 用户名为 xff1a root 密码 xff1a 123456 进入
  • 疑难杂症:Intellig IDEA启动Tomcat,控制台输出中文乱码(2018.3版本亲测可用)

    找到 IntelliJ IDEA 安装目录下bin目录下 xff0c 修改idea exe vmoptions和idea64 exe vmoptions两个文件 xff0c 在最后一行添加 Dfile encoding 61 UTF 8 修
  • 21.通用型1602液晶显示屏操作方法

    第7章通用型1602液晶显示屏操作方法 7 1液晶概述 液晶显示屏的主要原理是以电流刺激液晶分子产生点 线 面并配合背部灯管构成画面 液晶通常是按照显示字符的行数或液晶点阵的行 列数来命名的 xff0c 比如1602的意思是每行显示16个字
  • 外文文献检索网站

    1 Google scholar 网址 xff1a https scholar google com hk hl 61 zh CN 如今搜索论文的首选 xff0c 可以在这里查看论文统计和引用参考文献 xff0c 还能通过关注作者或者论文获
  • shell-awk的BEGIN和END

    文章目录 一 Awk 的两个特殊模式实例 xff1a 二 Awk高级应用1 if单分支语句2 if双分支语句3 for循环4 while循环 SHELL awk两个特殊模式 xff08 BEGIN 和 END xff09 及awk高级应用
  • HTML5基础知识

    目录 一 初识HTML 二 网页基本标签 2 1标题标签 2 3换行标签 2 4水平线标签 2 5字体样式标签 2 6注释和特殊符号 三 图像 xff0c 超链接 xff0c 网页布局 3 1图像标签 3 2链接标签 3 3块元素和行内元素
  • SQL Server 调用程序集(dll文件)

    1 生成对应的dll项目文件 如下图所示 xff08 示例 xff09 xff1a 2 打开SQL SERVER数据库 xff0c 创建程序集 xff0c 如下操作 找到 程序集 61 右击选中 新建程序集 点击 常规 xff0c 操作如下
  • 树莓派3b+镜像的安装以及常用的登录方式及树莓派换源

    安装镜像 1 xff0c 格式化内存卡用第一个工具 2 xff0c 把镜像写道内存卡中用第二个工具 登录 串口登录 因为树莓派默认的是蓝牙连接 xff0c 我们要断开蓝牙连接 xff0c 打开串口连接 将安装好的sd卡文件夹下的 cmdli

随机推荐

  • 通过kettle工具实现数据清洗与转换(实例)

    一 对文件merge csv进行完全去重 1 使用Kettle工具创建转换repeat transform xff0c 并添加 CSV文件输入 控件 唯一行 xff08 哈希值 xff09 控件以及Hop跳连接线 2 配置 CSV文件输入
  • JavaWed开发环境与搭建

    一 jdk下载与安装 1 下载 xff1a 进入官网 xff08 http www oracle com xff09 下载对应版本即可 2 设置环境变量 需要设置环境变量如下 xff08 JDK安装的位置 xff09 二 TomCat下载与
  • 【树莓派问题】树莓派python虚拟环境无法安装scipy库

    目录 问题描述 问题解决方法 报错关键字 xff1a Building wheel for numpy PEP 517 started Building wheel for numpy PEP 517 still running pip s
  • Codeblocks修改字体

    右上角settings editor general settings choose 选择好之后一路确定OK就可以了 但是大家谨慎改 xff0c 因为20 03版本的会报错 xff0c 就像我这样 xff0c 不知道其他版本修改后会不会有问
  • 论文阅读 MAML (Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks)

    Model Agnostic Meta Learning for Fast Adaptation of Deep Networks MAML 论文阅读 摘要介绍模型不可知元学习元学习问题定义模型不可知元学习算法 MAML种类监督回归和分类强
  • RIPV2动态路由协议—网络基础

    RIPV2动态路由协议 一 实验题目1 IP地址规划2 拓扑搭建3 配置IP地址与环回接口4 RIPV2的配置5 RIP的扩展配置 xff1a 6 成果展示 二 动态路由1 动态路由协议 xff1a 2 动态路由协议的缺点 xff1a 3
  • VC6.0 MFC 单文档 贪吃蛇游戏 基础入门

    贪吃蛇游戏 一 整体思路 1 贪吃蛇对大家来说并不陌生 xff0c 既然要设计贪吃蛇 xff0c 那么我们首先要定义蛇和食物这样两个对象 xff0c 并给它们添加一些成员变量 2 添加虚函数OnInitialUpdate 做一些初始化工作
  • 启动错误求助

    org springframework beans factory UnsatisfiedDependencyException Error creating bean with name 39 userController 39 Unsa
  • C++ 入门(编写第一个C++程序)

    第一章 遇见C 43 43 欢迎进入C 43 43 世界 xff01 1 1 C 43 43 介绍 C 43 43 是在C语言的基础上添加了面向对象和泛型编程的支持 xff0c 它是21世纪最重要的编程语言之一 xff0c C 43 43
  • yield和return的区别-- 超详细

    首先比较下return 与 yield的区别 xff1a return xff1a 在程序函数中返回某个值 xff0c 返回之后函数不在继续执行 xff0c 彻底结束 yield 带有yield的函数是一个迭代器 xff0c 函数返回某个值
  • Linux修改登录密码

    root 权限修改用户名密码 执行 xff1a passwd root 按照提示输入新的密码两次 如果用xshell连接的情况下 xff0c 需要重新验证新的密码 非root 权限修改用户名密码 执行 xff1a passwd userna
  • Ubuntu 更换apt-get源

    Ubuntu最初的apt get源在国外网站 xff0c 因此很多时候通过apt get安装软件速度会很慢 我们可以将apt get源更换成国内镜像源 xff0c 来解决速度慢的问题 更换apt get源主要有以下四个步骤 xff1a 1
  • Loadrunner11安装_简单使用基础教程

    资源均来源于网络 xff0c 若侵权 xff0c 请联系我删除 文章目录 一 Loadrunner11简介 二 Loadrunner11安装教程 三 Virtual User Generator教程 四 Controller教程 五 Ana
  • vue2快速安装环境,创建vue2项目教程(windows)

    1 安装环境 首先首先进入node js xff08 v12 13 0 msi版本 xff0c 最新版可能npm版本太高了 xff0c 会报错 xff0c 不过卸载重新装低版本也行 xff09 官网安装node js xff0c node
  • 树莓派4b安装docker报错解决

    树莓派安装docker参考 xff1a 方法1 xff1a 官方文档 xff08 脚本直接安装 xff09 方法2 xff1a 官方版本中译 xff08 嫌上一个麻烦的可以直接看这个 xff09 方法3 xff1a 非脚本安装方法 方法4
  • 2022创业基础——李家华等章节测试答案以及期末考试答案

    2022创业基础 李家华等章节测试答案以及期末考试答案 资源均来源于网络 xff0c 若侵权 xff0c 请联系我删除 需要的可以到我的阿里云盘下载 xff1a https www aliyundrive com s bkTQKG16TmC
  • java中的&lt;和&gt;分别是什么意思

    今天在做java笔试题的时候 xff0c 有一题出现了这个符号 xff0c 由于我不认识这个符号就做错了 xff0c 题目如下 xff1a 这题的答案是A 而我选了C 后面百度才知道 amp lt 的意思是小于 lt 符号 xff0c 在用
  • 由ip地址和子网掩码求网络号、主机号、广播地址(超详细)

    话不多说 xff0c 直接进入正题 xff0c 如果有概念理解不清楚的话 xff0c 可以去看文章后面的部分 xff0c 我直接在前面给出计算方法 1 用二进制数表示IP地址 在进行计算之前 xff0c 我们首先要学会十进制的IP地址怎么转
  • Arcgis加载在线地图(内涵各种在线地图)

    一 连接在线地图 1 首先打开Arcgis xff0c 找到GIS服务器 xff0c 双击添加WMTS服务器 xff1a 2 在URL框中填入在线地图URL xff1a http xdc at map wmts xff0c 点击获取图层 x
  • SpringBoot+Vue+EasyExcel+MybatisPlus+Lombok前后端分离实现Excel文件导入导出(简单实用版)

    一 前言 文章参考自两位大佬的博客 xff1a http events jianshu io p 4242556280fa https www w3xue com exp article 20228 80302 html 我在此基础上做了补