EXAMPLE AUTHENTICATIONS AND AUTHORITIES USING ANGULARJS + SPRING SECURITY+ RESTFUL + ACCESSTOKEN + COOKIES + BOOTSTRAP + JAVA + JPA + POSTGRESQL...
Loading repository data…
Loading repository data…
Rob-Leggett / repository
AngularJS, Restful, Spring, Spring Security, Hibernate,Bootstrap, Maven
A modern single-page application built with Angular 19 and Bootstrap 5 for the frontend, backed by Spring Boot 3.3 with Spring Security 6 for the API.
The application is split into two modules:
mvn clean package
This builds both the API and client modules.
cd api
mvn spring-boot:run
The API will be available at http://localhost:8080/api
cd client
npm install
npm start
The client dev server runs at http://localhost:4200 with API proxy to http://localhost:8080.
The API uses stateless token-based authentication:
/api/auth/loginX-AUTH-TOKEN response headerX-AUTH-TOKEN header| Username | Password |
|---|---|
| user@tester.com.au | password |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| POST | /api/auth/login | Login (Basic Auth) | No |
| GET | /api/user | Get current user | Yes |
| GET | /api/customer | List all customers | Yes |
| GET | /api/customer/{id} | Get customer by ID | Yes |
| POST | /api/customer | Create customer | Yes |
| PUT | /api/customer/{id} | Update customer | Yes |
| DELETE | /api/customer/{id} | Delete customer | Yes |
cd api
mvn clean verify # Run tests
mvn spring-boot:run # Run with hot reload
cd client
npm install # Install dependencies
npm start # Dev server with hot reload
npm run build # Production build
npm run test # Run unit tests
IntelliJ IDEA is recommended. Import the project as a Maven project.
For the frontend, ensure the Angular Language Service plugin is installed.
angular_bootstrap_spring/
├── api/ # Spring Boot backend
│ ├── src/main/java/
│ │ └── au/com/example/
│ │ ├── Application.java # Spring Boot entry point
│ │ ├── spring/ # Security & config
│ │ ├── controller/ # REST controllers
│ │ ├── service/ # Business logic
│ │ ├── repository/ # Data access
│ │ └── entity/ # JPA entities
│ └── src/main/resources/
│ ├── application.properties
│ └── data.sql # Sample data
├── client/ # Angular frontend
│ ├── src/app/
│ │ ├── components/ # Angular components
│ │ ├── services/ # HTTP services
│ │ ├── guards/ # Route guards
│ │ └── models/ # TypeScript interfaces
│ └── angular.json
└── pom.xml # Parent POM
Robert Leggett
If you find this project helpful, consider supporting further development:
Selected from shared topics, language and repository description—not editorial ratings.
EXAMPLE AUTHENTICATIONS AND AUTHORITIES USING ANGULARJS + SPRING SECURITY+ RESTFUL + ACCESSTOKEN + COOKIES + BOOTSTRAP + JAVA + JPA + POSTGRESQL...