Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

borellaster/spring-angular-integration

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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;

About

Spring MVC, Rest, Security, Data and AngularJS integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 57.2%
  • JavaScript 27.2%
  • HTML 15.4%
  • CSS 0.2%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.