how to integrate Angular 2 + Java Maven Web Application

后端 未结 6 1907
清歌不尽
清歌不尽 2020-12-04 08:14

I have created a Angular 2 front-end Application.and i have created one Java Rest WS Back-end Application which is connected to DB.

My Folder structure for Angular 2

6条回答
  •  攒了一身酷
    2020-12-04 08:56

    I recommend let the two applications separated, this way you have modularity. This way you can change the Angular App without affect your service, and vice versa. For second, your apache/nginx are faster to deliver your js and html from Angular instead Tomcat (for example). But if you still want put the Angular application inside the war, the pattern is that all web resources are in src/main/webapp.

提交回复
热议问题