Can @PathVariable return null if it's not found?
问题 Is it possible to make the @PathVariable to return null if the path variable is not in the url? Otherwise I need to make two handlers. One for /simple and another for /simple/{game} , but both do the same just if there is no game defined i pick first one from a list however if there is a game param defined then i use it. @RequestMapping(value = {"/simple", "/simple/{game}"}, method = RequestMethod.GET) public ModelAndView gameHandler(@PathVariable("example") String example, HttpServletRequest