另外我发现传递参数的时候也会报错,代码如下:
@ApiVersion("com.vanffer.example/v1alpha1")
@RestController
@RequestMapping("/pic")
public class PictureController {
@GetMapping("/get")
public String get(@RequestParam int id){
return "hello world";
}
}
报错如下:
Name for argument of type [int] not specified, and parameter name information not available via reflection. Ensure that the compiler uses the '-parameters' flag.
at org.springframework.web.reactive.result.method.annotation.AbstractNamedValueArgumentResolver.updateNamedValueInfo(AbstractNamedValueArgumentResolver.java:158) ~[spring-webflux-6.1.4.jar:6.1.4]
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
按照网上帖子在编译选项中加入--parameters之后则发现无法注入Service等bean