I have a project in Spring Boot that connects to Postgresql and sends the values by console , what I'm looking for is to be able to send it through JSON in a REST query, but I do not know which part to change the project. That's what I'm looking for to generate:
{
"depositarios": {
"correo": "correo",
"nombre": "nombre",
"numTel": "numTel",
"pApellido": "pApellido",
"SApellido": "sAellido"
}
}
This is my main class :
@SpringBootApplication
@ComponentScan("com.abner.springpostgresql.service.impl, com.abner.springpostgresql.dao.imp")
public class SpringPostgresqlApplication {
public static void main(String[] args) {
ApplicationContext context= SpringApplication.run(SpringPostgresqlApplication.class, args);
depoService depoService =context.getBean(depoService.class);
depoService.loadAllDepo();
}
}
Only when I run it tomcat sends me an error message 404. Here is my complete project .
Update: This is my console log