I have the following:
@RepositoryRestController
public class DataSetController {
@RequestMapping(value = "/cars/test", method = RequestMethod.GET)
public String testFetch() {
return "HELLO";
}
}
@RepositoryRestResource
public interface DataSetRepository extends PagingAndSortingRepository<DataSet, Integer>, QueryDslPredicateExecutor<DataSet> {}
The logs at startup indicate the following:
2015-08-21 18:49:46.050 INFO 52448 --- [ main] o.s.d.r.w.RepositoryRestHandlerMapping : Mapped "{[/cars/test],methods=[GET]}" onto public java.lang.String com.example.hello.dataset.DataSetController.testFetch()
My base uri in my config is:
base-uri: /api
So I should be able to get localhost:8080/api/cars/test
But here is what I get in the logs:
2015-08-21 18:58:10.847 WARN 52476 --- [nio-8080-exec-1] o.s.web.servlet.PageNotFound : No mapping found for HTTP request with URI [/api/cars/test] in DispatcherServlet with name 'dispatcherServlet'
Why?