I am trying to run my Angular/Spring Boot app on AWS Beanstalk and I have been deploying it as a jar file. It runs successfully and works as expected, however whenever I refresh the application I get a whitelabel 404 error. I have tried both these approaches here and here and I still have not been able to resolve my issue. Executing this code block in my controller that implements ErrorController:
private static final String PATH = "/error";
@RequestMapping(value = PATH)
public String error(){
return "forward:/index.html";
}
@Override
public String getErrorPath() {
return PATH;
}
returns simply the string "forward:/index.html" in place of the whitelabel 404 error page
I have searched everywhere through all related topics and not been able to fix this so any help is greatly appreciated