AngularJS + Spring MVC with security - where to start?

谁说我不能喝 提交于 2020-01-12 13:48:49

问题


I'm trying to build the front-end part of a project with Angular and a basic REST backend that also handles security.

I have very basic knowledge of Spring but haven't really worked with Spring Security.

I'm trying to find a way to build a simple REST backend that is secured. I have searched online a lot and the main thing i found was this tutorial: https://spring.io/guides/tutorials/spring-security-and-angular-js/ . After reading it I still don't understand how I should get started.

Also, this tutorial example works with Spring Boot and it has like a class you have to run and such, but I would like the more 'classic' Spring approach combined with maven where it's java-based configs and it runs on a Tomcat, I don't really understand the main class of the Spring Boot-way anyways.

I know how to set up a Spring project with REST controllers and I can get this to work without a problem, so that's something I don't need to figure out. I do need to figure out how to add security as simple as possible. I need user authentication and all that, but I really really have not a single clue how to go about is. What is all needed for this? Are there any better (non Spring Boot) tutorials out there?

Any help will be much appreciated!


回答1:


  1. First of all

    It will be a good thing that you know what is Spring boot ( Advantage of spring boot )

  2. secondly

    Here is some helpful resources :

    2.1 This is about the architecture Web App Architecture - the Spring MVC - AngularJs stack

    2.2 Spring Restful Web Service Example with JSON, Jackson and Client Program

    2.3 CRUD using Spring MVC 4.0 RESTful Web Services and AngularJS

    2.4 And for the security example Spring Data REST + Spring Security




回答2:


You can take a look at this open source Spring + AngularJS generator JHipster

Main site: http://jhipster.github.io/

quick slides: http://jhipster.github.io/presentation/#/




回答3:


For BackEnd - Learn basic simple spring boot first and try with sample project..
For Frontend - Using Grunt and Yoeman, you can create angular project.. Have a look at this site..
https://www.sitepoint.com/kickstart-your-angularjs-development-with-yeoman-grunt-and-bower/

Configure backend port in gruntfile.js.. Now You can start working on both front end and backend independently..



来源:https://stackoverflow.com/questions/29630654/angularjs-spring-mvc-with-security-where-to-start

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!