1、使用本地的minio一直沒(méi)問(wèn)題,使用linux服務(wù)器,上傳的時(shí)候發(fā)現(xiàn)報(bào)
Non-XML response from server. Response code: 404, Content-Type: text/html, body: Sorry, Page Not Found
2、最后發(fā)現(xiàn)是在檢查桶的時(shí)候,沒(méi)有桶的時(shí)候會(huì)報(bào),所以在報(bào)這個(gè)的時(shí)候一般是沒(méi)有桶
修改工具類
發(fā)現(xiàn)上傳什么的其他功能都正常,感覺(jué)可能是minio版本不同導(dǎo)致文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-754436.html
/**
* 校驗(yàn)是否存在bucket
*
* @param bucketName
* @throws Exception
*/
private boolean checkBucket(String bucketName) throws Exception {
if (StringUtils.isEmpty(bucketName)) {
throw new Exception("bucket不能為空");
}
BucketExistsArgs bucket = BucketExistsArgs.builder().bucket(bucketName).build();
try {
return minioClient.bucketExists(bucket);
} catch (Exception e) {
return false;
}
}
3、上傳文件后,發(fā)現(xiàn)頁(yè)面 顯示Sorry, Page Not Found
修改桶策略,再訪問(wèn)則正常了文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-754436.html
到了這里,關(guān)于解決minio服務(wù)器Non-XML response from server. Response code: 404, Content-Type: text/html, body: Sorry的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!