I am using the latest version of spring-boot and am trying to add ids to my json entities as described here
If I add this configuration, my JSON responses no longer work:
2015-03-02 11:55:13.949 DEBUG 8288 --- [nio-8080-exec-1] o.s.b.a.e.mvc.EndpointHandlerMapping : Looking up handler method for path /hal/tutorials/1 2015-03-02 11:55:13.951 DEBUG 8288 --- [nio-8080-exec-1] o.s.b.a.e.mvc.EndpointHandlerMapping : Did not find handler method for [/hal/tutorials/1] 2015-03-02 11:55:13.974 DEBUG 8288 --- [nio-8080-exec-1] o.s.b.a.e.mvc.EndpointHandlerMapping : Looking up handler method for path /error 2015-03-02 11:55:13.975 DEBUG 8288 --- [nio-8080-exec-1] o.s.b.a.e.mvc.EndpointHandlerMapping : Did not find handler method for [/error]
Here is my main configuration file, I have tried moving RepositoryConfig into it's own file and using @Component instead of @Configuration but nothing works.
@SpringBootApplication @EntityScan(basePackages = { "com.mypp.domain" }) @EnableJpaRepositories(basePackages = { "com.mypp.repository" }) @EnableTransactionManagement @EnableGlobalMethodSecurity @EnableJpaAuditing @EnableConfigurationProperties public class ShelltorialsApplication { public static void main(String[] args) { SpringApplication.run(ShelltorialsApplication.class, args); } } @Configuration public class RepositoryConfig extends RepositoryRestMvcConfiguration { @Override protected void configureRepositoryRestConfiguration( RepositoryRestConfiguration config) { config.exposeIdsFor(Tutorial.class); } } What am I doing wrong?