Unverified Commit 9f81d58c authored by zhanws's avatar zhanws Committed by GitHub
Browse files

Update WxStorageController.java (#530)

解决litemallStorage有可能返回null值,会造成异常
parent 5d144ee9
......@@ -66,7 +66,7 @@ public class WxStorageController {
@GetMapping("/fetch/{key:.+}")
public ResponseEntity<Resource> fetch(@PathVariable String key) {
LitemallStorage litemallStorage = litemallStorageService.findByKey(key);
if (key == null) {
if (litemallStorage==null||key == null) {
return ResponseEntity.notFound().build();
}
if (key.contains("../")) {
......@@ -91,7 +91,7 @@ public class WxStorageController {
@GetMapping("/download/{key:.+}")
public ResponseEntity<Resource> download(@PathVariable String key) {
LitemallStorage litemallStorage = litemallStorageService.findByKey(key);
if (key == null) {
if (litemallStorage==null||key == null) {
return ResponseEntity.notFound().build();
}
if (key.contains("../")) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment