12

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!

3
  • The url has a huge explanation of things. After reading all of that, did you follow along to setup the project as suggested in the tutorial in the link? Commented Apr 14, 2015 at 15:02
  • 1
    I did but it's all spring-boot based and I'm not at all familiar with it, I'm only familiar with the classic maven-spring approach with Java-based configurations and command line control and such Commented Apr 14, 2015 at 15:04
  • 1
    It seems that the two of us have almost the same problem. I started 1 week ago, building a ''classic'' spring application with angularjs. I partly implemented spring-security, but it isn't working properly at the moment. The tutorials I have seen were also regarding spring boot (something I don't want to use yet). I was stuck, 4 days, asking questions on SO and there were some kind people who helped me. However, it still isn't functioning as I would like it to. I'm also using MongoDB for a database. Oh, and these 3 technologies are all alien to me. Well except, spring-mvc without security.. Commented Apr 14, 2015 at 22:07

3 Answers 3

13
  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

Sign up to request clarification or add additional context in comments.

Comments

3

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/#/

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.