6月16
gyp ERR! find Python
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python checking if Python is C:\Users\Heck\AppData\Local\Programs\Python\Python39\python.exe
gyp ERR! find Python - "C:\Users\Heck\AppData\Local\Programs\Python\Python39\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python39\python.exe
gyp ERR! find Python - "C:\Program Files\Python39\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\Heck\AppData\Local\Programs\Python\Python39-32\python.exe
gyp ERR! find Python - "C:\Users\Heck\AppData\Local\Programs\Python\Python39-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python39-32\python.exe
gyp ERR! find Python - "C:\Program Files\Python39-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python39-32\python.exe
gyp ERR! find Python - "C:\Program Files (x86)\Python39-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\Heck\AppData\Local\Programs\Python\Python38\python.exe
gyp ERR! find Python - "C:\Users\Heck\AppData\Local\Programs\Python\Python38\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python38\python.exe
gyp ERR! find Python - "C:\Program Files\Python38\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\Heck\AppData\Local\Programs\Python\Python38-32\python.exe
gyp ERR! find Python - "C:\Users\Heck\AppData\Local\Programs\Python\Python38-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python38-32\python.exe
gyp ERR! find Python - "C:\Program Files\Python38-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python38-32\python.exe
gyp ERR! find Python - "C:\Program Files (x86)\Python38-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\Heck\AppData\Local\Programs\Python\Python37\python.exe
gyp ERR! find Python - "C:\Users\Heck\AppData\Local\Programs\Python\Python37\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python37\python.exe
gyp ERR! find Python - "C:\Program Files\Python37\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\Heck\AppData\Local\Programs\Python\Python37-32\python.exe
gyp ERR! find Python - "C:\Users\Heck\AppData\Local\Programs\Python\Python37-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python37-32\python.exe
gyp ERR! find Python - "C:\Program Files\Python37-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python37-32\python.exe
gyp ERR! find Python - "C:\Program Files (x86)\Python37-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\Heck\AppData\Local\Programs\Python\Python36\python.exe
gyp ERR! find Python - "C:\Users\Heck\AppData\Local\Programs\Python\Python36\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python36\python.exe
gyp ERR! find Python - "C:\Program Files\Python36\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\Heck\AppData\Local\Programs\Python\Python36-32\python.exe
gyp ERR! find Python - "C:\Users\Heck\AppData\Local\Programs\Python\Python36-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python36-32\python.exe
gyp ERR! find Python - "C:\Program Files\Python36-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python36-32\python.exe
gyp ERR! find Python - "C:\Program Files (x86)\Python36-32\python.exe" could not be run
gyp ERR! find Python checking if the py launcher can be used to find Python 3
gyp ERR! find Python - "py.exe" is not in PATH or produced an error
gyp ERR! find Python
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"
gyp ERR! find Python (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python npm config set python "C:\Path\To\python.exe"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack at PythonFinder.fail (D:\ITL\source\wechat\node_modules\node-gyp\lib\find-python.js:330:47)
gyp ERR! stack at PythonFinder.runChecks (D:\ITL\source\wechat\node_modules\node-gyp\lib\find-python.js:159:21)
gyp ERR! stack at PythonFinder.<anonymous> (D:\ITL\source\wechat\node_modules\node-gyp\lib\find-python.js:228:18)
gyp ERR! stack at PythonFinder.execFileCallback (D:\ITL\source\wechat\node_modules\node-gyp\lib\find-python.js:294:16)
gyp ERR! stack at exithandler (child_process.js:296:5)
gyp ERR! stack at ChildProcess.errorhandler (child_process.js:308:5)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:238:12)
gyp ERR! stack at onErrorNT (internal/child_process.js:407:16)
gyp ERR! stack at process._tickCallback (internal/process/next_tick.js:63:19)
gyp ERR! System Windows_NT 10.0.10586
解决方案:
1. 管理员权限打开cmd,在项目目录下执行:npm install --global --production windows-build-tools
安装成功会在C:\Users\**(电脑用户名) 目录下创建.windows-build-tools文件夹
2. 必须配置环境变量,将C:\Users\**\.windows-build-tools\python27地址添加到path中
3. 重启VSCode或者cmd窗口,我当时打开了2个VSCode窗口,只重启了一个,结果环境变量地址没有生效,又折腾了好久,一定要把所有VSCode窗口关闭重启。
也可以在python官网下载安装,还是要配置环境变量
在npm install安装期间,电脑又提示了安装.net framework4.8
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python checking if Python is C:\Users\Heck\AppData\Local\Programs\Python\Python39\python.exe
gyp ERR! find Python - "C:\Users\Heck\AppData\Local\Programs\Python\Python39\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python39\python.exe
gyp ERR! find Python - "C:\Program Files\Python39\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\Heck\AppData\Local\Programs\Python\Python39-32\python.exe
gyp ERR! find Python - "C:\Users\Heck\AppData\Local\Programs\Python\Python39-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python39-32\python.exe
gyp ERR! find Python - "C:\Program Files\Python39-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python39-32\python.exe
gyp ERR! find Python - "C:\Program Files (x86)\Python39-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\Heck\AppData\Local\Programs\Python\Python38\python.exe
gyp ERR! find Python - "C:\Users\Heck\AppData\Local\Programs\Python\Python38\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python38\python.exe
gyp ERR! find Python - "C:\Program Files\Python38\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\Heck\AppData\Local\Programs\Python\Python38-32\python.exe
gyp ERR! find Python - "C:\Users\Heck\AppData\Local\Programs\Python\Python38-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python38-32\python.exe
gyp ERR! find Python - "C:\Program Files\Python38-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python38-32\python.exe
gyp ERR! find Python - "C:\Program Files (x86)\Python38-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\Heck\AppData\Local\Programs\Python\Python37\python.exe
gyp ERR! find Python - "C:\Users\Heck\AppData\Local\Programs\Python\Python37\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python37\python.exe
gyp ERR! find Python - "C:\Program Files\Python37\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\Heck\AppData\Local\Programs\Python\Python37-32\python.exe
gyp ERR! find Python - "C:\Users\Heck\AppData\Local\Programs\Python\Python37-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python37-32\python.exe
gyp ERR! find Python - "C:\Program Files\Python37-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python37-32\python.exe
gyp ERR! find Python - "C:\Program Files (x86)\Python37-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\Heck\AppData\Local\Programs\Python\Python36\python.exe
gyp ERR! find Python - "C:\Users\Heck\AppData\Local\Programs\Python\Python36\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python36\python.exe
gyp ERR! find Python - "C:\Program Files\Python36\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Users\Heck\AppData\Local\Programs\Python\Python36-32\python.exe
gyp ERR! find Python - "C:\Users\Heck\AppData\Local\Programs\Python\Python36-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files\Python36-32\python.exe
gyp ERR! find Python - "C:\Program Files\Python36-32\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python36-32\python.exe
gyp ERR! find Python - "C:\Program Files (x86)\Python36-32\python.exe" could not be run
gyp ERR! find Python checking if the py launcher can be used to find Python 3
gyp ERR! find Python - "py.exe" is not in PATH or produced an error
gyp ERR! find Python
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"
gyp ERR! find Python (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python npm config set python "C:\Path\To\python.exe"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack at PythonFinder.fail (D:\ITL\source\wechat\node_modules\node-gyp\lib\find-python.js:330:47)
gyp ERR! stack at PythonFinder.runChecks (D:\ITL\source\wechat\node_modules\node-gyp\lib\find-python.js:159:21)
gyp ERR! stack at PythonFinder.<anonymous> (D:\ITL\source\wechat\node_modules\node-gyp\lib\find-python.js:228:18)
gyp ERR! stack at PythonFinder.execFileCallback (D:\ITL\source\wechat\node_modules\node-gyp\lib\find-python.js:294:16)
gyp ERR! stack at exithandler (child_process.js:296:5)
gyp ERR! stack at ChildProcess.errorhandler (child_process.js:308:5)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:238:12)
gyp ERR! stack at onErrorNT (internal/child_process.js:407:16)
gyp ERR! stack at process._tickCallback (internal/process/next_tick.js:63:19)
gyp ERR! System Windows_NT 10.0.10586
解决方案:
1. 管理员权限打开cmd,在项目目录下执行:npm install --global --production windows-build-tools
安装成功会在C:\Users\**(电脑用户名) 目录下创建.windows-build-tools文件夹
2. 必须配置环境变量,将C:\Users\**\.windows-build-tools\python27地址添加到path中
3. 重启VSCode或者cmd窗口,我当时打开了2个VSCode窗口,只重启了一个,结果环境变量地址没有生效,又折腾了好久,一定要把所有VSCode窗口关闭重启。
也可以在python官网下载安装,还是要配置环境变量
在npm install安装期间,电脑又提示了安装.net framework4.8
6月16
最近这段时间接手一个旧项目,拉下代码来,点运行Run和调试Debug都没有任何反应,点击之后状态栏没有进度,反而启动和调试按钮变成灰色不可点击的状态,并且console输出控制台没有任何输出。
启动没有状态,无法启动。
Bug描述:
在idea中启动不了springboot启动类,点击运行之后也按钮就变成了灰色的,debug也不行,什么反应都没有,也不提示也不报错,网上查了好多,都不管用。(控制台都不会弹出来,点了和没有点一样)
解决bug:
打开idea,然后点击菜单File->settings->plugins,最后搜索插件找到Groovy这个然后把这个插件后面框中的对勾去掉就可有了,也不知道为啥。
然后重启IDEA
问题解决!!!
启动没有状态,无法启动。
Bug描述:
在idea中启动不了springboot启动类,点击运行之后也按钮就变成了灰色的,debug也不行,什么反应都没有,也不提示也不报错,网上查了好多,都不管用。(控制台都不会弹出来,点了和没有点一样)
解决bug:
打开idea,然后点击菜单File->settings->plugins,最后搜索插件找到Groovy这个然后把这个插件后面框中的对勾去掉就可有了,也不知道为啥。
然后重启IDEA
问题解决!!!
6月15
问题现象一:
下载文件达到1min时,报连504 Gateway Time-out接超时。
解决方法:
nginx反向代理默认是60s超时,大文件下载超过了阀值,可以指定超时时间:
location /api {
proxy_pass http://127.0.0.1:8081;
# nginx跟后端服务器连接超时时间
proxy_connect_timeout 300;
# 后端服务器数据回传超时时间
proxy_send_timeout 300;
# 连接成功后,后端服务器响应超时时间
proxy_read_timeout 300;
proxy_set_header Host $host:$server_port;
}
问题现象二:
通过nginx反向代理下载失败,但是直接通过端口下载正常。
解决方法:
可能是nginx缓存区限制问题,禁用缓存即可。
proxy_pass http://127.0.0.1:5002;
proxy_redirect default;
proxy_buffering off;
下载文件达到1min时,报连504 Gateway Time-out接超时。
解决方法:
nginx反向代理默认是60s超时,大文件下载超过了阀值,可以指定超时时间:
location /api {
proxy_pass http://127.0.0.1:8081;
# nginx跟后端服务器连接超时时间
proxy_connect_timeout 300;
# 后端服务器数据回传超时时间
proxy_send_timeout 300;
# 连接成功后,后端服务器响应超时时间
proxy_read_timeout 300;
proxy_set_header Host $host:$server_port;
}
问题现象二:
通过nginx反向代理下载失败,但是直接通过端口下载正常。
解决方法:
可能是nginx缓存区限制问题,禁用缓存即可。
proxy_pass http://127.0.0.1:5002;
proxy_redirect default;
proxy_buffering off;
6月14
5月31
如将10.0.1.155的/u01/attachments 目录挂载到10.0.1.156对应的/u01/attachments 目录下。
使用以下命令:
mount 10.0.1.155:/u01/attachments /u01/attachments
使用以下命令:
mount 10.0.1.155:/u01/attachments /u01/attachments
5月29
一、在项目根目录下安装
npm install --save js-base64
npm install --save js-md5
1
2
二、在项目文件中引入
import md5 from 'js-md5';
let Base64 = require('js-base64').Base64;
1
2
3
三、在项目文件中使用
base64
Base64.encode('heckjj.com'); // aGVja2pqLmNvbQ==
Base64.encode( '大将军'); // 5aSn5bCG5Yab+
Base64.encodeURI('大将军'); // 5aSn5bCG5Yab-
Base64.decode(aGVja2pqLmNvbQ=='); // heckjj.com
Base64.decode('5aSn5bCG5Yab+'); // 大将军
// note .decodeURI() is unnecessary since it accepts both flavors
Base64.decode('5aSn5bCG5Yab-'); // 大将军
md5
md5(''); // d41d8cd98f00b204e9800998ecf8427e
md5('The quick brown fox jumps over the lazy dog'); // 9e107d9d372bb6826bd81d3542a419d6
md5('The quick brown fox jumps over the lazy dog.'); // e4d909c290d0fb1ca068ffaddf22cbd0
// It also supports UTF-8 encoding
md5('中文'); // a7bac2239fcdcb3a067903d8077c4a07
// It also supports byte `Array`, `Uint8Array`, `ArrayBuffer`
md5([]); // d41d8cd98f00b204e9800998ecf8427e
md5(new Uint8Array([])); // d41d8cd98f00b204e9800998ecf8427e
// Different output
md5(''); // d41d8cd98f00b204e9800998ecf8427e
md5.hex(''); // d41d8cd98f00b204e9800998ecf8427e
md5.array(''); // [212, 29, 140, 217, 143, 0, 178, 4, 233, 128, 9, 152, 236, 248, 66, 126]
md5.digest(''); // [212, 29, 140, 217, 143, 0, 178, 4, 233, 128, 9, 152, 236, 248, 66, 126]
md5.arrayBuffer(''); // ArrayBuffer
md5.buffer(''); // ArrayBuffer, deprecated, This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.
npm install --save js-base64
npm install --save js-md5
1
2
二、在项目文件中引入
import md5 from 'js-md5';
let Base64 = require('js-base64').Base64;
1
2
3
三、在项目文件中使用
base64
Base64.encode('heckjj.com'); // aGVja2pqLmNvbQ==
Base64.encode( '大将军'); // 5aSn5bCG5Yab+
Base64.encodeURI('大将军'); // 5aSn5bCG5Yab-
Base64.decode(aGVja2pqLmNvbQ=='); // heckjj.com
Base64.decode('5aSn5bCG5Yab+'); // 大将军
// note .decodeURI() is unnecessary since it accepts both flavors
Base64.decode('5aSn5bCG5Yab-'); // 大将军
md5
md5(''); // d41d8cd98f00b204e9800998ecf8427e
md5('The quick brown fox jumps over the lazy dog'); // 9e107d9d372bb6826bd81d3542a419d6
md5('The quick brown fox jumps over the lazy dog.'); // e4d909c290d0fb1ca068ffaddf22cbd0
// It also supports UTF-8 encoding
md5('中文'); // a7bac2239fcdcb3a067903d8077c4a07
// It also supports byte `Array`, `Uint8Array`, `ArrayBuffer`
md5([]); // d41d8cd98f00b204e9800998ecf8427e
md5(new Uint8Array([])); // d41d8cd98f00b204e9800998ecf8427e
// Different output
md5(''); // d41d8cd98f00b204e9800998ecf8427e
md5.hex(''); // d41d8cd98f00b204e9800998ecf8427e
md5.array(''); // [212, 29, 140, 217, 143, 0, 178, 4, 233, 128, 9, 152, 236, 248, 66, 126]
md5.digest(''); // [212, 29, 140, 217, 143, 0, 178, 4, 233, 128, 9, 152, 236, 248, 66, 126]
md5.arrayBuffer(''); // ArrayBuffer
md5.buffer(''); // ArrayBuffer, deprecated, This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.
5月28
Element UI Upload 上传文件上传文件一次 ,不论是上传成功之后修改文件再上传还是上传失败重新上传,再次点击上传均无反应。
方法一:利用 :on-success
ref=‘upload’
:on-success=“handleSuccess”
注意: ref='upload 一定要加上ref 不然不起作用
<el-upload
class="upload-demo"
action=""
:limit="1"
:show-file-list="false"
:http-request="uploadLogo"
ref='upload'
:on-success="handleSuccess"
>
<el-button style="width: 150px; height: 35px;line-height: 0;margin-left: 20px" size="medium"
type="primary">
{{$t('StaffManage.bulkImport')}}
</el-button>
</el-upload>
handleSuccess(res, file) {
this.$refs.upload.clearFiles(); //上传成功之后清除历史记录
// this.tableReload()
},
方法二:利用if el-upload让移除文档流
<el-upload
v-if="!form.contractFileUrl"
class="upload-demo"
action=""
:limit="1"
:show-file-list="false"
:http-request="uploadLogo"
>
<el-button size="medium" type="primary">{{$t('AttendanceInformation.ClickUpload')}}</el-button>
</el-upload>
uploadLogo(param) {
let _this = this
_this.form.contractFileUrl = '1'
let formData = new FormData();
formData.append("file", param.file);
_this.$send.post({url: '/contract/upload', data: formData}, res => {
if (res.code === 10000) {
_this.isdisabled = true
_this.form.contractFileUrl = res.data.url
_this.form.contractFileId = res.data.id
} else {
_this.form.contractFileUrl = null
_this.form.contractFileId = null
_this.$msg.error(res.message)
}
})
},
方法一:利用 :on-success
ref=‘upload’
:on-success=“handleSuccess”
注意: ref='upload 一定要加上ref 不然不起作用
<el-upload
class="upload-demo"
action=""
:limit="1"
:show-file-list="false"
:http-request="uploadLogo"
ref='upload'
:on-success="handleSuccess"
>
<el-button style="width: 150px; height: 35px;line-height: 0;margin-left: 20px" size="medium"
type="primary">
{{$t('StaffManage.bulkImport')}}
</el-button>
</el-upload>
handleSuccess(res, file) {
this.$refs.upload.clearFiles(); //上传成功之后清除历史记录
// this.tableReload()
},
方法二:利用if el-upload让移除文档流
<el-upload
v-if="!form.contractFileUrl"
class="upload-demo"
action=""
:limit="1"
:show-file-list="false"
:http-request="uploadLogo"
>
<el-button size="medium" type="primary">{{$t('AttendanceInformation.ClickUpload')}}</el-button>
</el-upload>
uploadLogo(param) {
let _this = this
_this.form.contractFileUrl = '1'
let formData = new FormData();
formData.append("file", param.file);
_this.$send.post({url: '/contract/upload', data: formData}, res => {
if (res.code === 10000) {
_this.isdisabled = true
_this.form.contractFileUrl = res.data.url
_this.form.contractFileId = res.data.id
} else {
_this.form.contractFileUrl = null
_this.form.contractFileId = null
_this.$msg.error(res.message)
}
})
},
5月17
4月21
IS浏览器无法读取mp4视频怎么办?针对这个问题,今天总结了这篇文章,希望能帮助更多想解决这个问题的朋友找到更加简单易行的办法。
IIS7以上的不支持mp4的时候提示如下报错
有时候会报404找不到文件,可视频文件明明在,就是访问不到。
由于扩展配置问题而无法提供您请求的页面。如果该页面是脚本,请添加处理程序。如果应下载文件,请添加 MIME 映射。
原因:因为服务器IIS默认不支持mp4等一些文件类型,只要在IIS上添加MIME 类型即可。
iis6.0版本
打开iis管理器找到你要设置的站点,右键属性,找到http头,就可以看到mime类型的按钮了,我们点击进去
比如你要添加mp4的mime我们就输入,扩展名.mp4 类型video/mp4,然后点击确人完成后测试下
iis7.5设置
找到你要设置的站点,点击功能视图,找到MIME类型选项
进入mime类型功能之后点击右上角的添加按钮添加扩展名.mp4 类型video/mp4,然后点击确人完成后测试下
常见的mime类型后续更新Mime类型扩展名意义
application/msexcel*.xls *.xlaMicrosoft Excel Dateien
application/mshelp*.hlp *.chmMicrosoft Windows Hilfe Dateien
application/mspowerpoint*.ppt *.ppz *.pps *.potMicrosoft Powerpoint Dateien
application/msword*.doc *.dotMicrosoft Word Dateien
application/octet-stream*.exeexe
video/mp4*.mp4MP4
application/pdf*.pdfAdobe PDF-Dateien
application/postscript*.ai *.eps *.psAdobe Postscript-Dateien
application/rtf*.rtfMicrosoft RTF-Dateien
application/x-httpd-php*.php *.phtmlPHP-Dateien
application/x-javascript*.jsserverseitige JavaScript-Dateien
application/x-shockwave-flash*.swf *.cabFlash Shockwave-Dateien
application/zip*.zipZIP-Archivdateien
audio/basic*.au *.sndSound-Dateien
audio/mpeg*.mp3MPEG-Dateien
audio/x-midi*.mid *.midiMIDI-Dateien
audio/x-mpeg*.mp2MPEG-Dateien
audio/x-wav*.wavWav-Dateien
image/gif*.gifGIF-Dateien
image/jpeg*.jpeg *.jpg *.jpeJPEG-Dateien
image/x-windowdump*.xwdX-Windows Dump
text/css*.cssCSS Stylesheet-Dateien
text/html*.htm *.html *.shtml-Dateien
text/javascript*.jsJavaScript-Dateien
text/plain*.txtreine Textdateien
video/mpeg*.mpeg *.mpg *.mpeMPEG-Dateien
video/vnd.rn-realvideo*.rmvbrealplay-Dateien
video/quicktime*.qt *.movQuicktime-Dateien
video/vnd.vivo*viv *.vivoVivo-Dateien
IIS7以上的不支持mp4的时候提示如下报错
有时候会报404找不到文件,可视频文件明明在,就是访问不到。
由于扩展配置问题而无法提供您请求的页面。如果该页面是脚本,请添加处理程序。如果应下载文件,请添加 MIME 映射。
原因:因为服务器IIS默认不支持mp4等一些文件类型,只要在IIS上添加MIME 类型即可。
iis6.0版本
打开iis管理器找到你要设置的站点,右键属性,找到http头,就可以看到mime类型的按钮了,我们点击进去
比如你要添加mp4的mime我们就输入,扩展名.mp4 类型video/mp4,然后点击确人完成后测试下
iis7.5设置
找到你要设置的站点,点击功能视图,找到MIME类型选项
进入mime类型功能之后点击右上角的添加按钮添加扩展名.mp4 类型video/mp4,然后点击确人完成后测试下
常见的mime类型后续更新Mime类型扩展名意义
application/msexcel*.xls *.xlaMicrosoft Excel Dateien
application/mshelp*.hlp *.chmMicrosoft Windows Hilfe Dateien
application/mspowerpoint*.ppt *.ppz *.pps *.potMicrosoft Powerpoint Dateien
application/msword*.doc *.dotMicrosoft Word Dateien
application/octet-stream*.exeexe
video/mp4*.mp4MP4
application/pdf*.pdfAdobe PDF-Dateien
application/postscript*.ai *.eps *.psAdobe Postscript-Dateien
application/rtf*.rtfMicrosoft RTF-Dateien
application/x-httpd-php*.php *.phtmlPHP-Dateien
application/x-javascript*.jsserverseitige JavaScript-Dateien
application/x-shockwave-flash*.swf *.cabFlash Shockwave-Dateien
application/zip*.zipZIP-Archivdateien
audio/basic*.au *.sndSound-Dateien
audio/mpeg*.mp3MPEG-Dateien
audio/x-midi*.mid *.midiMIDI-Dateien
audio/x-mpeg*.mp2MPEG-Dateien
audio/x-wav*.wavWav-Dateien
image/gif*.gifGIF-Dateien
image/jpeg*.jpeg *.jpg *.jpeJPEG-Dateien
image/x-windowdump*.xwdX-Windows Dump
text/css*.cssCSS Stylesheet-Dateien
text/html*.htm *.html *.shtml-Dateien
text/javascript*.jsJavaScript-Dateien
text/plain*.txtreine Textdateien
video/mpeg*.mpeg *.mpg *.mpeMPEG-Dateien
video/vnd.rn-realvideo*.rmvbrealplay-Dateien
video/quicktime*.qt *.movQuicktime-Dateien
video/vnd.vivo*viv *.vivoVivo-Dateien
4月7
(一)事务传播机制 7种
Required (默认):
如果当前没有事务,就新建一个事务,如果已存在一个事务中
加入到这个事务中,这是最常见的选择。
Supports :
支持当前事务,如果没有当前事务,就以非事务方法执行。
Mandatory :
中文翻译为强制,支持使用当前事务,如果当前事务不存在,则抛出Exception。
Requies_new :
创建一个新事务,如果当前事务存在,把当前事务挂起。
Not_Supported :
无事务执行,如果当前事务存在,把当前事务挂起。
Never :
无事务执行,如果当前有事务则抛出Exception。
Nested :
嵌套事务,如果当前事务存在,那么在嵌套的事务中执行。
如果当前事务不存在,则表现跟REQUIRED一样。
注解配置时如:@Transactional(propagation=Propagation.REQUIRED)
7种事务举例子可看此篇博客 感觉不错: https://www.cnblogs.com/myseries/p/10800430.html
(二)事务隔离级别
事务隔离级别 脏读 不可重复读 幻读
读未提交(Read-Uncommitted) 是 是 是
不可重复读(Read-Committed) 否 是 是
可重复读(Repeatable-Read) 否 否 是
串行化(Serializable) 否 否 否
注解配置时如:@Transactional(isolation = Isolation.READ_UNCOMMITTED)
Mysql 默认 可重复读 ---repeatable-read
事务的并发问题
1、脏读:事务A读取了事务B更新的数据,然后B回滚操作,那么A读取到的数据是脏数据
2、不可重复读:事务 A 多次读取同一数据,事务 B 在事务A多次读取的过程中,
对数据作了更新并提交,导致事务A多次读取同一数据时,结果 不一致。
3、幻读:系统管理员A将数据库中所有学生的成绩从具体分数改为ABCDE等级,
但是系统管理员B就在这个时候插入了一条具体分数的记录,
当系统管理员A改结束后发现还有一条记录没有改过来,就好像发生了幻觉一样,这就叫幻读。
小结:不可重复读的和幻读很容易混淆,不可重复读侧重于修改,幻读侧重于新增或删除。
解决不可重复读的问题只需锁住满足条件的行,解决幻读需要锁表
Required (默认):
如果当前没有事务,就新建一个事务,如果已存在一个事务中
加入到这个事务中,这是最常见的选择。
Supports :
支持当前事务,如果没有当前事务,就以非事务方法执行。
Mandatory :
中文翻译为强制,支持使用当前事务,如果当前事务不存在,则抛出Exception。
Requies_new :
创建一个新事务,如果当前事务存在,把当前事务挂起。
Not_Supported :
无事务执行,如果当前事务存在,把当前事务挂起。
Never :
无事务执行,如果当前有事务则抛出Exception。
Nested :
嵌套事务,如果当前事务存在,那么在嵌套的事务中执行。
如果当前事务不存在,则表现跟REQUIRED一样。
注解配置时如:@Transactional(propagation=Propagation.REQUIRED)
7种事务举例子可看此篇博客 感觉不错: https://www.cnblogs.com/myseries/p/10800430.html
(二)事务隔离级别
事务隔离级别 脏读 不可重复读 幻读
读未提交(Read-Uncommitted) 是 是 是
不可重复读(Read-Committed) 否 是 是
可重复读(Repeatable-Read) 否 否 是
串行化(Serializable) 否 否 否
注解配置时如:@Transactional(isolation = Isolation.READ_UNCOMMITTED)
Mysql 默认 可重复读 ---repeatable-read
事务的并发问题
1、脏读:事务A读取了事务B更新的数据,然后B回滚操作,那么A读取到的数据是脏数据
2、不可重复读:事务 A 多次读取同一数据,事务 B 在事务A多次读取的过程中,
对数据作了更新并提交,导致事务A多次读取同一数据时,结果 不一致。
3、幻读:系统管理员A将数据库中所有学生的成绩从具体分数改为ABCDE等级,
但是系统管理员B就在这个时候插入了一条具体分数的记录,
当系统管理员A改结束后发现还有一条记录没有改过来,就好像发生了幻觉一样,这就叫幻读。
小结:不可重复读的和幻读很容易混淆,不可重复读侧重于修改,幻读侧重于新增或删除。
解决不可重复读的问题只需锁住满足条件的行,解决幻读需要锁表