how to integrate Angular 2 + Java Maven Web Application

后端 未结 6 1913
清歌不尽
清歌不尽 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:47

    Funnily enough, I did just this last week!

    Using Netbeans 8.1 and a Tomcat servlet version 8.0.27

    Angular and Java project file structure.

    Java Project is called Foo. Angular Project is Bar

    Foo (Java Maven Project)
    |__ src
    |    |__ main
    |    |    |__ webapp (This folder contains the entire Angular Project)
    |    |    |    |__ META-INF
    |    |    |    |    \__ context.xml 
    |    |    |    |__ WEB-INF
    |    |    |    |    \__ web.xml
    |    |    |    |__ includes
    |    |    |    |    |__ css
    |    |    |    |    |__ images
    |    |    |    |    \__ js
    |    |    |    |
    |    |    |    | ## Bar project files are located here ##
    |    |    |    |
    |    |    |    |__ app
    |    |    |    |    \__ All .ts and compiled .js files are located here
    |    |    |    |__ node_modules
    |    |    |    |    \__ any dependencies used for Bar are located here
    |    |    |    |__ typings
    |    |    |    |    \__ typings for Typescript located here
    |    |    |    |
    |    |    |    |__ README.txt
    |    |    |    |__ index.jsp
    |    |    |    |__ package.json
    |    |    |    |__ systemjs.config.js
    |    |    |    |__ tsconfig.json
    |    |    |    |__ typings.json
    |    |    |    \ ## Bar project files end here
    |    |    | 
    |    |    |__ resources
    |    |    |    |__META-INF
    |    |    |    |    \__ persistence.xml
    |    |    |__ java
    |    |    |    |__ hibernate.cfg.xml
    |    |    |    |__ com
    |    |    |    |    |__ orgName
    |    |    |    |    |    |__ packageName
    |    |    |    |    |    |    \__ .java files are here
    |__ pom.xml
    \__ nb-configuration.xml
    

提交回复
热议问题