• 请不要在回答技术问题时复制粘贴 AI 生成的内容
Static2015
V2EX  ›  程序员

有没结合使用 AngularJS 和 spring 前后端分离开发的例子?介绍

  •  
  •   Static2015 · May 5, 2015 · 12976 views
    This topic created in 4203 days ago, the information mentioned may be changed or developed.

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

    14 replies  •  2015-07-09 16:49:34 +08:00
    jun4rui
    jun4rui
    May 5, 2015
    1
    我觉得angularjs只要接受后端的JSON渲染出页面就好了。后端就干干管理下session之类的就好了,这样清楚些
    shibo501c
    shibo501c
    May 5, 2015
    2
    youtube上有一个系列视频,名字叫Web Development Using Spring and AngularJS
    hjiang
    hjiang
    May 5, 2015
    3
    cfan8
    cfan8
    May 5, 2015
    4
    楼主指的应该是 SpringMVC,Spring本身和Angular好像没什么关系
    viator42
    viator42
    May 5, 2015
    5
    理论上说AngularJS后端可以用任何的语言框架.但总感觉他跟nodejs配合的最好.
    Static2015
    Static2015
    OP
    May 5, 2015
    6
    @cfan8 是的啊。。有没例子学习下
    billlee
    billlee
    May 5, 2015
    7
    用 AngularJS 的话,后端就不需要用 Spring MVC 了吧,后端只要提供 JSON API 就可以了。用 Java 做后台的话 Jersey 就可以了。
    phx13ye
    phx13ye
    May 5, 2015
    8
    兰州搜一下springmvc restful啊,记得依赖jackson-databind
    然后你在controler 这样写就返回json了
    ···
    @RequestMapping(value = "select", produces = "application/json")
    public @ResponseBody Person selectPerson() {

    return new Person();
    }
    ···
    yimity
    yimity
    May 6, 2015 via Android
    9
    angular和使用什么后端没关系嘛。
    liangzuobin
    liangzuobin
    May 6, 2015
    10
    Spring MVC 挺好用的,但是AngularJS……
    gushitong
    gushitong
    May 6, 2015
    11
    前一段练习过一个:MongoDB + Spring Data Mongo + Spring + Spring MVC + ANgularJS.
    简单的例子Github上有,比如: Https://github.com/Java-Geek/mase ...
    Static2015
    Static2015
    OP
    May 7, 2015
    12
    grzhan
    grzhan
    Jul 9, 2015
    14
    在逛Spring的博客看到的,可能可以作为一些参考: https://spring.io/blog/2015/01/12/spring-and-angular-js-a-secure-single-page-application
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1543 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 00:42 · PVG 08:42 · LAX 16:42 · JFK 19:42
    ♥ Do have faith in what you're doing.