I have integrated angular application inside spring boot application.. i.e. angular build files are placed inside static folder of spring boot application like following image.

I have defined two angular routing urls like
1. http://localhost:8080/pageone
2. http://localhost:8080/pagetwo
when I access above urls from browser, which are handled by server (spring boot application) directly and not by the angular. so I end up in page not found.
We can redirect to index page from spring boot like this
@GetMapping("/")
public RedirectView welcome(RedirectAttributes attributes) {
//attributes.addFlashAttribute("flashAttribute", "redirectWithRedirectView");
//attributes.addAttribute("pageToRequest", "paymentoverview");
return new RedirectView("index.html");
}
but we can only redirect to index.html page not to routing urls "/pageone" or "/pagetwo".
I don't want to end up in index page.
Somehow I wan't to end up in respective page that I accessed from browser automatically,
even after redirect to index page also fine.
I tried to send attributes along with index.html, but it doesn’t work. How can we fix this problem.