I have a spring boot application which is serving the AngularJS app within it. When I try to navigate using buttons, links etc everything is working good. But when try to refresh the page with F5, Spring container returns 404. Any clue about that? Below is Web configuration for the boot application.
@Configuration
public class UIWebConfig implements WebMvcConfigurer
{
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/").setViewName("forward:/index.html");
registry.addViewController("/admin").setViewName("forward:/admin/index.html");
}
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
configurer.setUseSuffixPatternMatch(false);
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry)
{
registry.addResourceHandler("/**").addResourceLocations("classpath:/static/");
}
}