spring-attic / tut-react-and-spring-data-rest

React.js and Spring Data REST :: A tutorial based on the 5-part blog series by Greg Turnquist
https://spring.io/guides/tutorials/react-and-spring-data-rest
882 stars 1.58k forks source link

Feature Request - Client Side routing support #69

Closed praveenav closed 6 years ago

praveenav commented 6 years ago

A standard way for the server to handle redirects to single page application? Single Page applications have client-side routing. What is the standard/recommended way to handle such scenarios with Spring Security?

For example,

  1. All requests to /api/* should be handled by controllers on server
  2. Remaining requests should be responded with index.html
gregturn commented 6 years ago

Spring MVC supports things like "redirect:/some/path" for server side generating redirects. As for client side routine I don't have much experience in that. You'd have to research that outside the scope of this tutorial and pursuant to your client side toolkit (react or whatever).