Git Product home page Git Product logo

spring-angular-integration's Introduction

Spring & AngularJS integration

A project template as an example of integration amoung Spring framework MVC, Rest, Security and Data modules and AngularJS. Inspired in philipsorst/angular-rest-springsecurity project.

Aspects presented in project:

  • A relational or NoSQL database to manage users with Spring data MongoDB or JPA;
  • A REST service to expose users data;
  • Authentication and authorization against the REST service.
  • A set of AngularJS application pages to view or edit users depending on their role.

Features

Spring Framework

  • Application setup with servlet 3.0 specification and without XML configs;
  • Logback set to debug operations;

Spring MVC resources

  • Users data exposes through REST;
  • Exposing HTML, CSS, Javascript and other non-secured resources, however each one can be blocked through a Spring Security rule;
  • Errors and exceptions controlled via advices;

Spring Security resources

  • Rules in order to filter requests to rest application and html pages;
  • Custom authentication entry-point and request filter based on token;
  • Token utils;

AngularJS Security resources

  • Angular Routes;

  • $rootScope and cookies are used to hold and save credentials;

  • routeChange listener checking credentials;

  • HTTP interceptor to catch errors form back-end;

  • User operation methods in $rootScope:

      ng-show = "hasRole('ROLE_ADMINISTRATOR')" #enable or disable content based on roles
      
      ng-click = "logout()" #erase any authetication record
    

Project uses:

Spring projects:

Other projects:

JS libs:

Notes

  • It's only an example/demonstration and does not aim to be used for production projects. Use it to learn about the technologies used.
  • Despite there are many different technogies involved, this project focus on Spring Security and Angular integration;

spring-angular-integration's People

Contributors

jhonnymertz avatar

Watchers

James Cloos avatar Sudhi S avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.