I have the following code in one of my plugins which works well with ES 5.1.2. However with ES 5.6.8 it compiles, but runs into problem as it is not possible to inject RestController directly.
Please let me know the workaround for the same?
Also could you please share any example?
public class IndexCleanerAction implements RestHandler {
@Inject
public IndexCleanerAction(final RestController controller) {
controller.registerHandler(RestRequest.Method.GET, "/_indexcleaner/indexcleanup", this);
controller.registerHandler(RestRequest.Method.POST, "/_indexcleaner/indexcleanup", this);
controller.registerHandler(RestRequest.Method.PUT, "/_indexcleaner/indexcleanup/{id}", this);
controller.registerHandler(RestRequest.Method.DELETE, "/_indexcleaner/indexcleanup/{id}", this);
}