Al intentar acceder a la URL, el sistema esta arrojando 404
.
Se utiliza la siguiente url
:
http://localhost:8080/reserva/consultaporNUIP
¿Qué estoy haciendo mal?
Éste el es controlador.
@Controller
@CrossOrigin
@RequestMapping(path = "/reserva")
public class ClienteWS {
@Autowired
private ClienteServicio clienteServicio;
@RequestMapping(path="/consultaporNUIP", method = RequestMethod.GET)
public @ResponseBody ResponseEntity buscarPorCedula(@RequestParam int nuip) {
Cliente cliente = new Cliente();
try {
cliente = clienteServicio.consultarPorCedula(nuip);
return new ResponseEntity(cliente, HttpStatus.OK);
} catch (Exception e) {
return new ResponseEntity(cliente, HttpStatus.INTERNAL_SERVER_ERROR);
}
}
}
El Log:
2019-03-30 21:12:02.320 INFO 7272 --- [ main] org.hibernate.Version : HHH000412: Hibernate Core {5.3.7.Final}
2019-03-30 21:12:02.321 INFO 7272 --- [ main] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2019-03-30 21:12:02.474 INFO 7272 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
2019-03-30 21:12:02.608 INFO 7272 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
2019-03-30 21:12:02.811 INFO 7272 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2019-03-30 21:12:03.014 INFO 7272 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2019-03-30 21:12:03.059 WARN 7272 --- [ main] aWebConfiguration$JpaWebMvcConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2019-03-30 21:12:03.272 INFO 7272 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2019-03-30 21:12:03.275 INFO 7272 --- [ main] c.h.r.aplicacion.ReservaApplication : Started ReservaApplication in 3.41 seconds (JVM running for 3.753)
2019-03-30 21:12:05.839 INFO 7272 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2019-03-30 21:12:05.840 INFO 7272 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2019-03-30 21:12:05.847 INFO 7272 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 7 ms