value中的{search}换成{search:.+}即可解决
@RequestMapping("/outToExcel/{logType}/{search:.+}")
@ResponseBody
public ModelAndView outLogToExcel(
@PathVariable String logType,
HttpServletResponse response ,
HttpServletRequest request,
@PathVariable String search
)