2019年 08月 02日 - spring-boot-devtools

    背景

    spring-boot-devtools使用多个类加载器,可能会导致spring上下文获取bean获取不到,类cast exception等问题

    2019年 07月 01日 - 前端开发环境

    背景

    后台页面自己开发,主要使用技术为TypeScript + React

    IDE: Visual Studio Code atom

    ide方面vscode经过各种配置,一直没有配置达到想要的效果,后来接触Ant Design时有推荐Atom编辑器,

    安装配置后还算合适,故选择Atom编辑器(网络不畅通).

    2019年 04月 11日 - js读取csv

    读取文件到网页

    <!DOCTYPE html>
    <html>
    <head>
    </head>
    <body>
    jsReadFile:<input type="file" onchange="jsReadFiles(this.files)"/>
    <button onclick="jsReadFiles();">read</button>
    </body>
    <script>
    //js 读取文件
    function jsReadFiles(files) {
        if (files.length) {
            var file = files[0];
            var reader = new FileReader();//new一个FileReader实例
            console.log('file.type:%o',file.type)
            if (/text+/.test(file.type)) {//判断文件类型,是不是text类型
                reader.onload = function() {
                    $('body').append('<pre>' + this.result + '</pre>');
                }
                reader.readAsText(file);
            } else if(/image+/.test(file.type)) {//判断文件是不是imgage类型
                reader.onload = function() {
                    $('body').append('<img src="' + this.result + '"/>');
                }
                reader.readAsDataURL(file);
            }
        }
    }
    </script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.0/jquery.slim.js"></script>
    </html>
    

    2019年 04月 10日 - nodejs的安装

    安装

    1. 官网nodejs
    2. centOS:yum install nodejs
    3. mac:brew install node

    进阶操作

    • 使用n模块进行多版本管理,n(不支持Windows系统)
    • 使用nvm进行多版本管理,nvm