Started’s Springboot Project but I can’t get Postman’s Apis

Asked

Viewed 61 times

-1

The start project but when I call in Postman nothing comes back, nor the error. It’s as if the project had not gone up! In pom.xml are the dependencies: jpa, mysql and web. I have not touched them. My packages are separated into entities, Repository, service and controller.

Below is my application.properties inserir a descrição da imagem aqui

log: inserir a descrição da imagem aqui

  • all your classes are in the same package, or you are using different packages?

  • has to put the start log of your spring-boot?

  • The packages are separated. I added the question... I also added the log

  • you used @Componetscan to locate your packages?

  • I didn’t use, I don’t know that note

1 answer

0


Place the @Componentscan(value = "br.com.your package.controller.ou.etc") annotation in your Application class.

example:

package br.com.meuprojeto.exemplo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;



@SpringBootApplication
@ComponentScan(value = "br.com.meuprojeto.controller")
public class ExemploApplication {

    public static void main(String[] args) {
        SpringApplication.run(ExemploApplication.class, args);
    }

}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.