Demos using Spring boot with Angular2
JavaScript Shell TypeScript Batchfile Java HTML
Latest commit e653e34 Nov 23, 2016 @bijukunjummen Fixed formatting


Spring Boot with Angular2

This is a recipe for using Spring Boot with Angular 2 as described here

Steps to recreate the project

spring init --dependencies=web spring-boot-angular2-static-sample
cd spring-boot-angular2-static-sample
ng init

Edit angular-cli.json and modify outDir to src/main/resources/static/

That is it, build angular 2 content:

ng build

Start up UI:

mvn spring-boot:run

Additional Steps

Proxy the backend by creating a proxy.conf.json file with entries:

  "/api": {
    "target": "http://localhost:8080",
    "secure": false

and start up UI part of the app using:

ng serve --proxy-config proxy.conf.json