简体   繁体   中英

How to combine Angular-Cli frontend to Spring-boot backend

I currently have a web application that runs an Angular 2 frontend, and a Spring Boot backend.

I have followed this tutorial in order to integrate the two components.

http://blog.jdriven.com/2016/12/angular2-spring-boot-getting-started/

My application now has the same structure as this

https://github.com/jbruinink/ng2boot

The frontend and backend can now be built with a single command. However the frontend and backend generate seperate jars, and need to be started seperately.

Is there a way to package my appliacation in a single jar that starts both the frontend and the backend?

That question was actually asked and answered in the comment section:

"The frontend is actually packaged into the backend jar. You can simply start the backend and go to http://localhost:8080 . The development server at port 4200 is optional. It just makes it easier to develop the frontend, because all changes are reloaded automatically."

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM