一、Linux安装mysql(5.7.30)步骤及问题

(1)Linux安装mysql步骤:https://blog.csdn.net/weixin_38003389/article/details/90696337

(2)mysql启动问题:https://blog.csdn.net/weixin_33801856/article/details/93807230

(3)securecrt连不上Linux的mysql:https://blog.csdn.net/fenglele_fans/article/details/81276667

二、windows安装mysql和maven

       mysql安装步骤:https://blog.csdn.net/qq_37350706/article/details/81707862

  maven安装步骤:https://blog.csdn.net/Humbunklung/article/details/127729128

三、虚拟机

(1)centos7镜像下载:

         链接:https://pan.baidu.com/s/1ZMKybtvIBZS7zgNFiFPlhg 提取码:t400
         链接:https://pan.baidu.com/s/1eT1KqJ4 密码:lqgv

(2)虚拟机安装centos7步骤:https://www.cnblogs.com/wcwen1990/p/7630545.html

         在安装的时候有software selection,选择server with gui可以设置图形界面

(3)centos7安装图形界面:https://www.cnblogs.com/handongxue/p/9549047.html

(4)centos7固定ip:https://www.cnblogs.com/itbsl/p/10219891.html

四、centos安装docker

(1)docker安装步骤:https://blog.csdn.net/li1325169021/article/details/90780627

(2)获取阿里云镜像加速器:https://blog.csdn.net/li1325169021/article/details/90770119

         阿里云加速器地址:https://rmaycjhw.mirror.aliyuncs.com

(3)启动docker:systemctl start docker

(4)docker部署项目示例:https://blog.csdn.net/yangzailehehe/article/details/99625399

(5)docker操作:

         开启docker:systemctl start docker
         删除docker镜像:docker rmi 镜像id
         删除docker容器:docker rm 容器id
         查看当前正在运行的容器:docker ps
         查看已退出的容器:docker ps -a
         查看所有镜像:docker images
         启动终止容器:docker start 容器id
         centos7使用firewall而不是iptables

(6)老男孩docker视频:https://pan.baidu.com/s/1xl8f3NQ4sUfAfGqH3FVHDQ  密码: vit6

五、SecureCRT和SecureFX

        安装步骤:https://blog.csdn.net/qq_27721169/article/details/81127746

六、idea配置vue

(1)node.js安装:https://blog.csdn.net/qq_39470733/article/details/80496404

(2)IDEA配置npm启动:https://blog.csdn.net/jomexiaotao/article/details/80533548

(3)将npm显示在左侧栏中:https://zhidao.baidu.com/question/693258700757305604.html

七、vue执行流程

(1)vue的执行流程:

         https://blog.csdn.net/YuDBL/article/details/85117202
         https://blog.csdn.net/YuDBL/article/details/85121184

(2)vue中index.html、main.js、App.vue、index.js之前的关系以及加载过程:

         https://blog.csdn.net/qq_34182808/article/details/86690193

八、git使用

(1)git安装步骤:https://www.cnblogs.com/xueweisuoyong/p/11914045.html

         git安装与使用:https://blog.csdn.net/wawawawawawaa/article/details/81172452

(2)码云仓库地址:https://gitee.com/xielili1/springcloudservice.git

(3)git上传文件:https://my.oschina.net/u/4322747/blog/3243174/print

(4)上传文件问题解决:     

         https://blog.csdn.net/qq_34908844/article/details/79039709
         https://blog.csdn.net/u014596302/article/details/86610078

(5)git帮助文档:https://docs.xhsceis.com/zh-cn/usermanual/devops/codehub_hlp_0006.html

(6)git使用TortoiseGit进行代码操作(TortoiseGitPlink提示输入密码解决方法):https://blog.csdn.net/lala1583165/article/details/108277387

九、文件导入导出

(1)excel数据导入导出mysql参考:

         https://blog.csdn.net/guanmao4322/article/details/82814721
         https://www.cnblogs.com/kyliechen/p/10732760.html
         ssm框架:https://blog.csdn.net/dirkwlk/article/details/81909663
         GitHub上:https://github.com/lihuibohemeng/170807_JavaPOISSM

(2)excel导入导出mysql功能总结:

         最终参考:https://blog.csdn.net/dirkwlk/article/details/81909663
         代码下载:https://download.csdn.net/download/dirkwlk/10617815

(3)excel模板导出参考:

         https://www.cnblogs.com/itmyhome/p/4131416.html
         https://blog.csdn.net/every__day/article/details/79006930

         excel模板导出总结:

供给能力监测页面数据导出示例:

导入依赖
<dependency>
    <groupId>net.sf.jxls</groupId>
    <artifactId>jxls-core</artifactId>
    <version>1.0.5</version>
</dependency>

前台页面:
 function batchExportBtn(flag) {
    if(flag=="Y"){
        window.location="${ctx}/ui-portal/companymonitor/batchExportBtn?materialIds="+materialIds+"&sortName="+sortNameTmp+"&sortType="+sortTypeTmp+"&dataDate=" + dataDate;
    }else{
        swal("请联系管理员授权!");
    }
 }


后台代码:
//批量导出
@ResponseBody
@RequestMapping(value = "batchExportBtn", method = {RequestMethod.GET, RequestMethod.POST})
public void batchExportBtn(@RequestParam(name = "materialIds") String materialIds,
                           @RequestParam(name = "provinceId", required = false) String provinceId,
                           @RequestParam(name = "sortName", required = false) String sortName,
                           @RequestParam(name = "sortType", required = false) String sortType,
                           @RequestParam(name = "dataDate", required = false) String dataDate) {
    logger.debug("materialIds[{}]", materialIds);
    logger.debug("sortName[{}]", sortName);
    logger.debug("sortType[{}]", sortType);

    JSONObject result = null;
    String resultCode = "0";
    String resultInfo = "success";

    Map<String, Object> param = new HashMap<String, Object>();

    List<JSONObject> provinceDataInfoList = new ArrayList<JSONObject>();
    MaterialInfoMVO materialInfoMVO = new MaterialInfoMVO();
    try {
        if (materialIds == null || materialIds.length() == 0) {
            throw new AppException("12", "materialIds is null");
        }

        param.put("materialIds", materialIds);

        param.put("provinceId", provinceId);
        param.put("sortName", sortName);
        param.put("sortType", sortType);
        param.put("dataDate", dataDate);

        result = companyMonitorDelegate.getProvinceDataInfo(param);
        provinceDataInfoList = result.getJSONArray("provinceDataInfoList");


        materialInfoMVO.setMaterialId(materialIds);
        materialInfoMVO = materialInfoDelegate.queryBean(materialInfoMVO);

        result.put("materialUnit", materialInfoMVO.getMaterialUnit());


    } catch (AppException e) {
        resultCode = e.getErrId();
        resultInfo = e.getErrMsg();
    } catch (SysException e) {
        e.printStackTrace();
        resultCode = "31";
        resultInfo = e.getMessage();
    } catch (Exception e) {
        e.printStackTrace();
        resultCode = "-1";
        resultInfo = e.getMessage();
    }

    Map<String, Object> map = new HashMap<String, Object>();
    map.put("title", materialInfoMVO.getMaterialName());
    map.put("list", provinceDataInfoList);
    map.put("materialUnit", materialInfoMVO.getMaterialUnit());
    String tmp = CompanyMonitorController.class.getResource("/").getPath();
    System.out.println(tmp);

    tmp = tmp.substring(0, tmp.indexOf("WEB-INF")) + "WEB-INF/xlsTemplate/";
    System.out.println(tmp);
    String templateFilePath = tmp + "ggnljcResult.xls";
    String timeM = String.valueOf(System.currentTimeMillis());
    try {
        templateFilePath = URLDecoder.decode(templateFilePath, "utf-8");
        // 生成文件流
        Workbook workbook = new XLSTransformer().transformXLS(new FileInputStream(templateFilePath), map);

        // 准备下载
        ExportUtil.doDownLoad(workbook, "供给能力监测"+dataDate+".xls", response);
    } catch (Exception e) {
        e.printStackTrace();
    }
}



工具类ExportUtil

package com.ui.portal.util;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.ss.usermodel.Workbook;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URLEncoder;

/**
 * @author luffy--
 * @data 2018/11/13 14:38
 */
public class ExportUtil {
    /**
     * 导出Excel
     * @param sheetName sheet名称
     * @param title 标题
     * @param values 内容
     * @param wb HSSFWorkbook对象
     * @return
     */
    public static HSSFWorkbook getHSSFWorkbook(String sheetName, String []title, String [][]values, HSSFWorkbook wb){
        // 第一步,创建一个HSSFWorkbook,对应一个Excel文件
        if(wb == null){
            wb = new HSSFWorkbook();
        }
        //在workbook中添加一个sheet,对应Excel文件中的sheet
        HSSFSheet sheet = wb.createSheet(sheetName);
        //在sheet中添加表头第0行
        HSSFRow row = sheet.createRow(0);
        // 创建单元格,并设置值表头 设置表头居中
        HSSFCellStyle style = wb.createCellStyle();
        style.setAlignment(HSSFCellStyle.ALIGN_CENTER); // 创建一个居中格式
        style.setFillForegroundColor((short) 13);//设置背景颜色
        style.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
        //声明列对象
        HSSFCell cell = null;
        //创建标题
        for(int i=0;i<title.length;i++){
            cell = row.createCell(i);
            cell.setCellValue(title[i]);
            cell.setCellStyle(style);
        }
        //创建内容
        for(int i=0;i<values.length;i++){
            row = sheet.createRow(i + 1);
            for(int j=0;j<values[i].length;j++){
                //将内容按顺序赋给对应的列对象
                row.createCell(j).setCellValue(values[i][j]);
            }
        }
        return wb;
    }


    public static void doDownLoad(Workbook workbook, String name, HttpServletResponse response) {
        OutputStream fos = null;
        try {
            response.reset();
            response.setHeader("Content-disposition", "attachment;success=true;filename =" + URLEncoder.encode(name, "utf-8"));
            fos = response.getOutputStream();
            workbook.write(fos);
            fos.flush();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (fos != null) {
                try {
                    fos.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}



excel模板中使用jxls循环获取数据
View Code

(3)文件上传参考:       

         https://www.jb51.net/article/113068.htm
         https://www.cnblogs.com/flypig666/p/11745249.html

         自己文件上传代码:

前端页面:
 <div style="margin-top: 10px;">
    <input type="file" id="upload" name="upload" value="" style="float: left" />
    <button onclick="uploadFile()" style="float: left">上传</button>
</div>


//文件上传函数
function uploadFile(){
    var file = $("#upload").val();
    file = file.substring(file.lastIndexOf('.'), file.length);
    console.log(file,"file")
    if (file == '') {
        alert("上传文件不能为空!");
    }else{
        var formData = new FormData();
        var name = $("#upload").val();
        formData.append("file", $("#upload")[0].files[0]);
        formData.append("name", name);
        $.ajax({
            url : "${ctx}/companyinfo/evaluatefeedbackinfo/fileUpload",
            type : "POST",
            async : false,
            data : formData,
            processData : false,
            contentType : false,
            beforeSend : function() {
                console.log("正在进行,请稍候");
            },
            success : function(e) {
                if (e == "01") {
                    alert("恭喜您,上传成功!", function () {
                    }, {type: 'success', confirmButtonText: 'OK'});
                } else {
                    alert("上传失败");
                }
            }
        });

    }
}




后台代码:
 /**
  * 文件上传
  */
@RequestMapping(value = "/fileUpload",method = RequestMethod.POST)
@ResponseBody
public String fileUpload(@RequestParam("file") MultipartFile file, HttpServletRequest request) throws Exception {
    CacheManager cacheManager = CacheManager.getInstance();
    String flag = "";// 上传标志
    if (!file.isEmpty()) {
        try {
            //获取文件名,防止中文文件名乱码
            String filename = new String(file.getOriginalFilename().getBytes("ISO-8859-1"), "UTF-8");
            //上传文件路径
            //String tmp = EvaluateFeedBackInfoController.class.getResource("/").getPath();
            //String path = tmp.substring(0, tmp.indexOf("WEB-INF")) + "WEB-INF/uploadfile/";

            String path=(String) cacheManager.get("table.cache.idvalue.sysconfig", "900035");
            //创建文件实例
            File filePath = new File(path,filename);
            //写入文件
            file.transferTo(filePath);
            flag = "01";
        } catch (Exception e) {
            flag = "03";// 上传出错
            e.printStackTrace();
        }
    }
    return flag;
}




总结:文件上传路径写对,请求类型不要错

为了防止文件名是中文乱码,需要处理一下

得到文件上传路径和文件名,创建文件实例,参数传入路径和文件名称

然后调用多文件的transferTo方法进行文件上传
View Code

(4)文件下载参考:

         https://blog.csdn.net/Cheng_May/article/details/78600833
         https://blog.csdn.net/bingocbj/article/details/72858906
         https://blog.csdn.net/wwd0501/article/details/49890881/

         自己文件下载代码:

前端页面:
<a value = "+evaluateFeedBackInfoMVOS[i].backFileUrl+" onclick="downFile(this)">查看附件</a>

function downFile(data) {
    //根据value属性获取到value的值
    filename = $(data).attr("value");
    window.location.href = "${ctx}/ibdpnb/evaluatefeedbackinfo/download?filename="+filename;
}


后台代码:
/**
 * 文件下载
 */
@RequestMapping(value = "/download",method = RequestMethod.GET)
public void download(HttpServletResponse response) throws IOException  {
    CacheManager cacheManager = CacheManager.getInstance();
    response.setCharacterEncoding("UTF-8");
    response.setContentType("text/html;charset=utf-8");
    //获得请求文件名
    String filename = request.getParameter("filename");
    //读取目标文件,通过response将目标文件写到客户端
    //获取目标文件的绝对路径
    String path=(String) cacheManager.get("table.cache.idvalue.sysconfig", "900035");
    String fullFileName = path +"/"+ filename;
    //处理文件名称为中文下载文件名异常的情况
    //filename = new String(filename.getBytes(), "ISO-8859-1");
    filename = URLEncoder.encode(filename,"UTF-8");
    //通知浏览器以下载的方式打开
    response.addHeader("Content-type", "appllication/octet-stream");
    response.addHeader("Content-Disposition", "attachment;filename="+filename);

    //读取文件
    InputStream in = new FileInputStream(fullFileName);
    OutputStream out = response.getOutputStream();
    //写文件
    int b;
    while((b=in.read())!= -1)
    {
        out.write(b);
    }
    in.close();
    out.close();
}



总结:文件下载使用路径跳转的形式,请求类型为GET请求

得到文件名以及文件下载路径,拼接成完整的文件路径,注意"/"不要缺少

由于文件名为中文名下载的文件会有异常,需要对文件名称处理一下,两种方式都可以

设置浏览器以下载方式打开

定义文件输入流和输出流对文件进行读取和写入,最后关闭流
View Code

十、ajax同步与异步

        ajax优缺点与使用:https://www.cnblogs.com/yangguoe/p/8461932.html

十一、sitemesh的简介

        sitemesh简介:https://www.cnblogs.com/lexiaofei/p/7044497.html

十二、jstree简介

        jstree详细教程:https://www.iteye.com/blog/yiding-123-2345329
        jstree:https://blog.csdn.net/weixin_39752671/article/details/89972828
        jstree文档:https://blog.csdn.net/qq_36640744/article/details/80093313

十三、linux安装rabbitmq、redis

        linux安装rabbitmq:https://www.cnblogs.com/fengyumeng/p/11133924.html
        linux安装redis:https://www.cnblogs.com/zuidongfeng/p/8032505.html

 十四、shiro实现登录认证与权限授权管理            

        shiro配置:https://www.cnblogs.com/sharpest/p/5867851.html
        shiro学习书籍:跟我学shiro教程
        shiro登录成功之后跳转url:https://blog.csdn.net/qq_38157516/article/details/80587789
        shiro源码研究之登录与登出:https://blog.csdn.net/lqzkcx3/article/details/78819536
        shiro源码研究之构建Subject实例:https://blog.csdn.net/lqzkcx3/article/details/78801403
        shiro的session和spring的session:https://www.cnblogs.com/onlymate/p/8391274.html

十五、SpringCloud微服务学习资料

        4天从浅入深精通SpringCloud 微服务架构完整视频:http://yun.itheima.com/course/600.html?2003sxk
        配套资料:https://pan.baidu.com/s/1DFrV3m4mF8Y7-Rkgv98irw 提取码:xj0g

 十六、Python爬虫技术5天速成(2020全新合集)

   Python入门+数据可视化:https://www.bilibili.com/video/BV12E411A7ZQ?from=search&seid=12516173322672444643

   爬取的网站案例:豆瓣电影   https://movie.douban.com/top250

 十七、java虚拟机指令集

   java虚拟机:https://cloud.tencent.com/developer/article/1333540

十八、powerdesigner安装

  powerdesigner安装:https://www.fujieace.com/software/powerdesigner.html