title: How to use React's BrowserRouter on client and Java REST API (Spring Boot) on the server?
body: <p>I want to use React on the client and Java Spring Boot on the server for REST API, both client and server are packaged together so they are hosted on the same application server.</p>
  
  <p>I can already query the server APIs via the <code>/api</code> path.</p>
  
  <p>But (how) can I use the <code>BrowserRouter</code> of <code>react-router-dom</code> (Router v4) on the client instead of the <code>HashRouter</code>?</p>
  
  <p>I don't know Spring Boot well, but I guess I could check on the server if the route does not match <code>/api</code>, then I would return the <code>index.html</code> with all the react logic handling the route based on HTTP query location path?</p>
  
  <p>I hope I am clear, I don't want the hash in the URL and routing must be done on the client.</p>