angular.js - 有没结合使用AngularJS和spring前后端分离开发的例子?介绍
PHPz
PHPz 2017-05-15 16:51:49
0
1
751

最近在学习使用AngularJS与后端结合开发,有使用过的前辈能不能介绍下,或者给个简单的例子学习学习

PHPz
PHPz

学习是最好的投资!

reply all(1)
巴扎黑

The java side is completely deprecatedjsp改为开发api,返回jsondata

Then the view has a separate res folder to store the angular project. It is actually a pure front-end and can be placed anywhere and run across domains

Just negotiate the API between both ends

  • update
  1. This is the front-end directory structure, the folder is called webapp
  2. This is the directory under the backend main
  • About deployment
    When deploying, you can directly create a war包发布就可以了吧,因为是前后端分离的,你部署可以只考虑后端啊,前端放在哪里应该都一样的,我这个是放在java项目下面,其实后端在远端服务器,这个webapp directory on the backend and put it on your own computer to solve cross-domain problems. It can also run because it has been separated
  • About running
    If you want to access, you only need to access the front-end html page, because angular is obtained from the back-endjson数据,整体打包跑tomcat或者单独把webapp拿出来跑nginxIt should be fine

ps: I am not doing Java. This is a project that is not convenient for you. If you have any questions, you can continue to ask.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template