云文件管理系统上传组件优化
This commit is contained in:
19
src/main/java/com/filesystem/controller/IndexController.java
Normal file
19
src/main/java/com/filesystem/controller/IndexController.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package com.filesystem.controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
@Controller
|
||||
public class IndexController {
|
||||
|
||||
@GetMapping({"/", "/login", "/register"})
|
||||
public String forward() {
|
||||
return "forward:/webapp/index.html";
|
||||
}
|
||||
|
||||
// 捕获所有前端路由,返回 index.html 让 Vue Router 处理
|
||||
@GetMapping("/desktop/**")
|
||||
public String desktop() {
|
||||
return "forward:/webapp/index.html";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user