Spring Boot Application – View Resolver for Static Angular Pages.

Build Your Angular Project Into resources/static folder. You can specify the folder in angular.json file.

Here is the generated files.

Have your controller return a string “index”

public class HomepageController {

public String index() {
return "index";

Then enable WebMVC and tweak some configuraitons. This should serve the index.html from the resources/static folder.

public class MvcConfig implements WebMvcConfigurer {

public InternalResourceViewResolver viewResolver() {
InternalResourceViewResolver bean = new InternalResourceViewResolver();
return bean;

public void addResourceHandlers(ResourceHandlerRegistry registry) {