AngularJS +带有安全性的Spring MVC - 从哪里开始? [英] AngularJS + Spring MVC with security - where to start?

查看:195
本文介绍了AngularJS +带有安全性的Spring MVC - 从哪里开始?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Angular构建项目的前端部分,并使用基本的REST后端来处理安全性。



我有非常基本的知识Spring但是没有真正使用过Spring Security。



我正试图找到一种方法来构建一个安全的简单REST后端。我在网上搜索了很多,我找到的主要内容是本教程: https://spring.io/guides/tutorials/spring-security-and-angular-js/ 。阅读之后我仍然不明白我应该如何开始。



此外,本教程示例适用于Spring Boot,它就像你必须运行的类一样这样,但我希望更经典的Spring方法结合maven,它是基于java的配置,并且它运行在Tomcat上,我真的不太了解Spring Boot方式的主要类。



我知道如何使用REST控制器设置Spring项目,我可以毫无问题地使用它,这是我不需要弄清楚的。我确实需要弄清楚如何尽可能简单地添加安全性。我需要用户身份验证和所有这些,但我真的没有一个线索如何去做。这需要什么?有没有更好的(非Spring Boot)教程?



任何帮助都将不胜感激!

解决方案


  1. 首先



    这将是一件好事你知道什么是Spring启动的东西(弹簧启动的优势)<这是一些有用的资源:



    2.1这是关于架构
    Web App Architecture - Spring MVC - AngularJs堆栈



    2.2
    Spring Restful使用JSON,Jackson和客户端程序的Web服务示例



    2.3 使用Spring MVC 4.0 RESTful Web服务和AngularJS的CRUD



    2.4对于安全示例 Spring Data REST + Spring Security



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. 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

这篇关于AngularJS +带有安全性的Spring MVC - 从哪里开始?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆