Aly*_*ali 5 java spring spring-mvc spring-boot
我使用Spring Boot并且我的主控制器处理所有顶级网址:
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class IndexController {
@GetMapping({"/*"})
public ResponseEntity<String> handleIndex() {
// ...
}
}
Run Code Online (Sandbox Code Playgroud)
由于某些原因,我想/exclude_path从控制器的处理中排除路径。
像这样的东西:
@GetMapping(include={"/*"}, exclude={"/exclude_path"})
Run Code Online (Sandbox Code Playgroud)
您能回答我该怎么做吗?
| 归档时间: |
|
| 查看次数: |
2074 次 |
| 最近记录: |