package com.books.bookstore.controller;
import org.springframework.stereotype.Controller;
@Controller
public class HomeController {
@RequestMapping(value = "/")
public String index() {
return "index";
}
@RequestMapping(value = "/myAccount")
public String myAccount() {
return "myAccount";
}
}
https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 org.springframework.boot spring-boot-starter-parent 2.2.6.RELEASE com.bookstore bookstore 0.0.1-SNAPSHOT bookstore This is the description of my project.
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
http://localhost:8081/myAccount
Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback.
Wed Apr 01 14:36:39 EAT 2020 There was an unexpected error (type=Not Found, status=404). No message available