static html without .html in the URL.
so I created a @Controller as the below:
@ Controller
public class Test{
//way(1)
@ RequestMapping("/a")
public String a(){
return "index";
}
//way(2)
@ RequestMapping("/b/c")
public String bc(){
return "index";
}
}
application.properties:
spring.mvc.view.suffix= .html
Way (1) works
But way(2) returns 404!
index.html is inside of static folder.
Why?
How are you trying to access the second page? Do you receive any exception?
Обсуждают сегодня