Reputation: 15
I have got a requirement to implement a File Upload functionality using GraphQL. My current Micronaut project has already some Controller classes and graphql-java-servlet supports file upload, it needs a Servlet to be created. How do I configure the micronaut project for both Controllers and Servlet?
I have tried creating simple servlet from graphql-java-servlet in the micronaut project and keeping all my controllers as it is.
public class HelloServlet extends GraphQLHttpServlet {
@Override
protected GraphQLConfiguration getConfiguration() {
...
}
private GraphQLSchema createSchema() {
...
}
}```
When I start the Micronaut application. it only identifies controllers and I am able to invoke them using curl request. Unfortunately (@WebServlet) is not configured and not exposed.
Upvotes: 0
Views: 442
Reputation: 12238
Micronaut does not support the servlet API, so it is not possible to register a servlet.
Upvotes: 1