Spring Boot: Cannot access REST Controller on localhost (404)

前端 未结 18 1485
天命终不由人
天命终不由人 2020-11-27 12:05

I am trying to adapt the REST Controller example on the Spring Boot website. Unfortunately I\'ve got the following error when I am trying to access the localhost:8080/

18条回答
  •  遥遥无期
    2020-11-27 12:39

    Place your springbootapplication class in root package for example if your service,controller is in springBoot.xyz package then your main class should be in springBoot package otherwise it will not scan below packages

提交回复
热议问题