When it comes down to it, an AngularJS application consists of a bunch of HTML and JS files. Since those are simply static files, you can serve those files with Spring Boot. Here's a minimalistic example:
Spring boot application runner:
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
A sample REST controller:
@RestController
public class MyRestController {
@RequestMapping(value = "/api")
public String getSomething() {
return "something";
}
}
An index.html which bootstraps the angular app:
<html>
<head>
<script src="/path/to/angular.js"></script>
<script src="myangularapp.js"></script>
</head>
<body>
<div ng-app="myAngularApp"></div>
</body>
</html>
Where index.html and myangularapp.js are both located in /resources/public (assuming a Maven project structure)
When running the spring boot application the Angular app is accessible on http://localhost:8080/index.html
The REST interface is accessible on http://localhost:8080/api