Reputation: 692
I am trying to accomplish the following (if possible).
I have a single page application at localhost:8080
and everything currently lands on localhost:8080/
even if a user enters: localhost:8080/signIn
It does client side routing so that after you land on localhost:8080/
you can click a button and it takes you to localhost:8080/signIn
Is there a way using springboot to allow whatever the user passes in without having it redirect automatically to localhost:8080/
(all the while returning the single page - index.html)?
Thanks!
Upvotes: 0
Views: 1632
Reputation: 121
Try this way
@Controller
@RequestMapping("/")
public class AnythingController{
@RequestMapping(value="**",method = RequestMethod.GET)
public String getAnything(){
// your code
}
}
Upvotes: 2