18 lines
528 B
Java
18 lines
528 B
Java
package org.datasurvey.web.rest;
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
@Controller
|
|
public class ClientForwardController {
|
|
|
|
/**
|
|
* Forwards any unmapped paths (except those containing a period) to the client {@code index.html}.
|
|
* @return forward to client {@code index.html}.
|
|
*/
|
|
@GetMapping(value = { "/{path:[^\\.]*}", "/{path:^(?!websocket).*}/**/{path:[^\\.]*}" })
|
|
public String forward() {
|
|
return "forward:/";
|
|
}
|
|
}
|