When injecting Helidon io.helidon.webserver.ServerRequest or io.helidon.webserver.ServerResponse as fields inside a controller, the annotation processor fails compilation with an error like:
java: No dependency provided for com.example.app.ProductController on com.example.app.ProductController$Route, java: Dependencies [com.example.app.ProductController] are not provided - there are no @Singleton, @Component, @Factory/@Bean that currently provide this type. If this is an external dependency, consider specifying it via @External.
Steps to reproduce
@Controller
@Path("/products")
public class ProductController {
@Inject
ServerRequest request;
@Inject
ServerResponse response;
@Produces("text/plain")
@Get
String getSimple() {
return "simple";
}
}
Here is the code generated by the annotation processor.
