Angular Spring Reactive Sample

screenshot of Angular Spring Reactive Sample
angular

RESTful API demos with Spring 6 WebFlux, Spring Boot 3, Spring Data Mongo, Spring Security, Spring Session and Angular (upgraded to v16)

Overview:

The Angular Spring Reactive Sample application demonstrates building backend RESTful APIs with the Reactive stack in Spring 5 and creating the frontend single page application (SPA) with Angular 5. The project structure consists of a client application built with Angular CLI and a backend RESTful API developed using Spring Boot.

Features:

  • Reactive Stack: Utilizes the newest Reactive stack introduced in Spring 5 for the backend API.
  • Single Page Application: The frontend is built using Angular 5, providing a modern and interactive user interface.
  • Docker Support: The project includes a docker-compose.yml file for starting required services like MongoDB and Redis using Docker.

Build and Run:

  1. Clone the source codes into your local system.
  2. Server:
    • Ensure you have installed Apache Maven, Oracle JDK 8, Docker, and Docker Compose.
    • In the project root folder, run docker-compose up to start the required MongoDB and Redis services.
    • Run the application using the Spring Boot Maven plugin.
  3. Client:
    • Navigate to the client folder and run ng serve to start the frontend UI.
    • Access the frontend application at http://localhost:4200.

CORS Configuration:

  • By default, the application does not use a CORS config.
  • To enable CORS support:
    • Server Side: Activate the CORS profile when running the Spring Boot application.
    • Client Side: Add a standalone CORS configuration in the Angular settings to connect directly to the backend.

Summary:

The Angular Spring Reactive Sample project showcases the integration of Angular 5 for the client-side SPA and Spring 5's Reactive stack for the backend RESTful APIs. With support for Docker and step-by-step installation instructions, developers can easily set up and run this sample application to explore the capabilities of these technologies.

angular
Angular

Angular is a TypeScript-based open-source framework by Google for building dynamic single-page applications and cross-platform mobile apps with MVC architecture and a rich set of features.