背景
spring-boot-devtools使用多个类加载器,可能会导致spring上下文获取bean获取不到,类cast exception等问题
spring-boot-devtools使用多个类加载器,可能会导致spring上下文获取bean获取不到,类cast exception等问题
Atom编辑器配置备忘录
后台页面自己开发,主要使用技术为TypeScript + React
IDE: Visual Studio Code | atom |
ide方面vscode经过各种配置,一直没有配置达到想要的效果,后来接触Ant Design时有推荐Atom编辑器,
安装配置后还算合适,故选择Atom编辑器(网络不畅通).
<!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>