Spring REST端点的解释是否有顺序?
如果您有多个具有不同端点的文件,例如Spring REST端点的解释是否有顺序?,spring,rest,spring-boot,spring-rest,Spring,Rest,Spring Boot,Spring Rest,如果您有多个具有不同端点的文件,例如 @RequestMapping(value="/identity" , method=RequestMethod.GET) @RequestMapping(value="/mobilities/validate" , method=RequestMethod.POST) @RequestMapping(value="/upload" , method=RequestMethod.POST) 在另一个文件中 正在@Controller 如果我得到了/i
@RequestMapping(value="/identity" , method=RequestMethod.GET)
@RequestMapping(value="/mobilities/validate" , method=RequestMethod.POST)
@RequestMapping(value="/upload" , method=RequestMethod.POST)
在另一个文件中
正在@Controller
如果我得到了/identity
,我如何确定要使用的端点是/identity
而不是/*
是否有订单(如在NodeJS中,
/*
之前的/identify
将始终执行/*
功能),或者如果没有匹配,是否有确切的路线,它回到了stars?似乎它将尽最大努力匹配入站请求。RequestMappingHandlerMapping将尽最大努力找到最佳匹配的请求处理方法(也称为ost特定方法)@M.Deinum我实际上是想看看在刷新的情况下,始终在端点/*
交付我的React应用程序的index.html
是否安全。
@GetMapping("/*")
@GetMapping("/*/*")