How to resolve error 404 in postman with SpringBoot REST?

I am new to spring boot and i have been trying to get a simple api request via postman. But, I am stuck with an error 404. Can someone point the errors in my code?.

I have a spring boot simple app build with maven and run in embedded tomcat through STS. I tried to send this request


Here is my controller code:

public class MenuController {
  private MenuRepository menuRepository;

  public List<Menu> list() {
    return menuRepository.findAll();


public interface MenuRepository extends JpaRepository<Menu, Integer> {}

The error status in postman:

"timestamp": "2022-08-05T04:46:28.489+00:00",
"status": 404,
"error": "Not Found",
"path": "/api/vi/menu/getAll"

The port is in default 8080.

I tried adding url to the getmapping after referring some online documentations, but still the error 404 is not resolved. Can someone point the error and explain me ?


>Solution :

You are calling wrong URL


correct url is


Change vi to v1

Leave a Reply