I want to make a simple java application and I want to use CRUDREPOSITORY and my own repository. I have this:
@RestController
@Transactional
@ExposesResourceFor(Person.class)
@RequestMapping("/prueba")
public class PersonController {
@RequestMapping(value="/prueba", method=RequestMethod.GET)
public String person(@RequestParam(value="id", defaultValue="1") int id) {
return "hola"+id;
}
}
this:
@RepositoryRestResource
public interface IClientRepository extends CrudRepository<Client, Long> {
}
The problem is that the CRUD works well, but I can´t call my localhost:8080/prueba/prueba because it gives a 404 error. I have try all and I cant access it, please help me!!
@RepositoryRestResource). Is there a mapping there for/prueba/prueba?