I am trying to adapt the Controller example on the Spring Boot website. Unfortunately I've got the error 404 when I am trying to access the localhost:8080/NewFile URL
my EcomercController.java :
package com.techprimers.jpa.springjpahibernateexample.web;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@Controller
public class EcomercController {
@RequestMapping(value = "/NewFile", method = RequestMethod.GET)
public String NewFile(){
return "NewFile";
}
}
and also i added this dependency in my porm.xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
and my path package
com.exemple
----- com.exemple.web.EcomercController.java
com.exemple.SpringJpaHibernateExampleApplication
and my file NewFile.html in
resources->static->NewFile.html
SpringApplication?