问题一:
2020-11-15 14:33:37.285 [http-nio-9898-exec-4] WARN o.s.w.s.m.support.DefaultHandlerExceptionResolver - Resolved [org.springframework.web.bind.MissingPathVariableException: Missing URI template variable 'product_id' for method parameter of type int]
2020-11-15 14:52:57.010 [http-nio-9898-exec-3] WARN o.s.w.s.m.support.DefaultHandlerExceptionResolver - Resolved [org.springframework.web.bind.MissingPathVariableException: Missing URI template variable 'domain' for method parameter of type String]
原因:Get请求参数问题,Restful格式错误导致,@GetMapping("/data/")
@GetMapping("/data/{product_id}/{domain}") public TestEnv getEnvData(@PathVariable("product_id") int product_id,@PathVariable("domain") String domain){ TestEnv testEnv = testEnvService.selectByDomainID(product_id, domain); return testEnv; }