
Explore how microservices differ from monolithic architectures, with independent modules and databases, scalable deployments, and easier continuous integration and deployment, compared to a single unified project.
Architect and implement a microservices-based online course enrollment app with user and course services offering CRUD operations, security, discovery via Eureka and Zuul gateway, using Spring Boot and React.
Prepare server-side infrastructure by installing MySQL community server, configuring background services, and using HeidiSQL for database workbench; also install IntelliJ and Java 8, configuring it in IntelliJ.
Import a Spring Boot project in IntelliJ by creating a demo with start spring io, extracting it, and opening it. Gradle or Maven auto-configures; refresh dependencies if needed.
Install and configure Lombok in IntelliJ to simplify server-side code by replacing getters and setters with Lombok annotations, and enable annotation processing in settings.
Explore Lombok basics to automate getters and setters, data and value annotations, and equals and hashCode, then create empty or full-argument constructors for clean, immutable code.
Explore Spring core and dependency injection, illustrating how loose coupling via interfaces and inversion of control enables flexible repository changes, with constructor, setter, and field injection in Spring components.
Explore the user service architecture, implementing CRUD operations and security with Spring Boot and an MVC structure using model, repository, service, and Rest controller.
Create and import your first microservice with Spring initializer. Use Gradle, Java, and Spring Boot 2.1.6, and configure web, security, Java Persistence API, rest repositories, Liquibase, MySQL, Eureka Discovery.
Open and import the user-service micro service in IntelliJ to set up and begin development within the React + Spring Boot microservices and Spring Cloud course.
Configure application.properties to set port 8000, assign a service name, connect to MySQL with UTC timezone, and enable Liquibase with ddl-auto=none and a changelog path.
Explore Hibernate as an object-relational mapping tool for Java, covering core annotations (@Entity, @Table, @Column, @Id, @GeneratedValue), relationships (one-to-one, one-to-many, many-to-many), and fetch strategies (eager vs. lazy) with practical examples.
Create a user model class as an entity with id, name, username, password, and a role enum with user and admin values, using Lombok @Data for getters, setters, and hashCode.
Describe Liquibase as a SQL migration library for relational databases, outline database changelog built from changesets in XML, JSON, or SQL, and highlight rollback and cross-database migration via XML.
Learn basic sql queries for relational databases, including creating databases and tables, defining primary keys, and inserting, deleting, truncating, and selecting data.
Create a Liquibase changeset for the user model by building db.changelog-1.0.xml with a databaseChangeLog and changeSets in sql format, then include it in the master changelog.
Master JPA repositories in Spring Boot to perform CRUD operations, extend repositories with entity and id, and create custom queries with findBy fields and query annotations, leveraging Spring Boot auto-configuration.
Create a user repository by extending JpaRepository with User and long, enabling automatic CRUD operations, and implement custom queries like findByUsername and findByIdList using hql with a query annotation.
Create a Spring MVC user service with UserService and UserServiceImpl, wiring to the user repository and implementing saveUser, findByUsername, and findUsers by id list with PasswordEncoder.
Define and expose a rest user controller in Spring, wiring the user service with autowired dependencies, and implement register, login, and batch name lookups with rest endpoints.
Learn how Spring Security secures login and authenticated rest API paths using authentication headers, implements UserDetailsService, applies password encryption, and defines login and logout paths.
Explore the authentication module of spring security with a focus on form login. Understand how http filters process base64 credentials and delegate authentication to providers, updating the security context.
Implement the spring security layer by creating UserDetailsServiceImpl to load users by username from the repository and return a security user with username, password, and role.
Explore Spring Security default configurations and customization for login paths, HTTP basic, session management, CSRF, CORS, and role-based access control.
Configure Spring web security with WebSecurityConfig to extend WebSecurityConfigurerAdapter, permit resources, error, and service paths while authenticating all URLs, and enable cors with a bcrypt encoder and user details service.
Create a eureka discovery service by initializing a Gradle-based spring project via spring.io, using Java and Spring Boot 2.1.6+, with the eureka-server dependency to enable service discovery.
Configure application.properties to set the port and manage eureka behavior with registerWithEureka and fetchRegistry, then enable the Eureka server in the main class so other services can connect.
Build and run our system, and test the Eureka server setup for microservices. See how these components integrate within a React and Spring Boot microservices and Spring Cloud setup.
Enable Eureka in the user service by creating an Eureka client and registering with the Eureka server. Learn Eureka zone, instance features, lease renewal, and discovery via @EnableEurekaClient and @EnableDiscoveryClient.
Learn to list discoverable services and instances with the eureka discovery service using DiscoveryClient, exposing service/services, service/port, and service/instances, and test by redeploying the user microservice.
Run the Eureka server from its main class, start the user service, and access it in a browser, where Spring redirects to the authentication page.
Explore Caruso architecture for a Spring Boot microservice, applying mvc structure with model, repository, and rest controller, using Hibernate ORM and Lombok, and implementing a consumer service that calls services.
Boot a microservice with Spring Initializr, selecting cradle project options and core dependencies for web, persistence, REST, migrations, database, service discovery, Lombok, and inter-service communication.
Configure application properties to name the app cruise service and set its port. Define database credentials and support for multiple databases, using Liquibase changelogs to describe changes.
Create a course model class as a database entity with an auto-generated id and additional fields, and generate equals and hashCode methods using Lombok.
Create a transaction model with an auto-generated id, a course-id join field, and a user-id field, using Bloomberg data annotation for equals and hashCode.
Define liquibase database change sets for model classes using an xml changelog file, with authors and unique IDs, and implement rollbacks for tables and the transaction table.
Learn how to implement Liquibase for test data by creating insert queries, building a changelog, and integrating changelog templates and components into the master changelog.
Define and implement jpa repositories for transactions by creating a dedicated package, extending the appropriate repository interfaces, and adding query methods like findAllByUserId and findByCourseId.
Build spring service layer by creating a service interface and a @Service implementation, wiring in course and transition repositories. Implement functions to list courses, find user transactions, and save transitions.
Develop a Spring Cloud Feign client to connect to the user service and fetch usernames. Enable Feign in the main configuration and call it from a controller.
This lecture demonstrates implementing a course controller, wiring to service methods, and exposing endpoints to find user transactions, find all cursus, and save transactions.
Enable Eureka service on the course service by configuring a discovery client, registering microservice instances, and listing service ports and instances for seamless inter-service communication.
Define origins for cross-origin resource sharing (CORS) by creating a default MVC configuration class and overriding the addCorsMappings method to configure CORS options for testing.
Run and test the course service, then explore the user service and access server sites from browsers.
Install and configure a gateway microservice using Spring Cloud Netflix Zuul, providing a single gateway path for all microservices. Build a Gradle-based Spring Boot project with a service-to-service communication dependency.
Configure application properties for the microservices by setting the app name and server port, ignoring headers like access-control-allow-origin and credentials, and forwarding login authorization headers to API and gateway routes.
Solve timeout problems in the service by enabling eager loading and adjusting default connection and read timeouts.
Define allowed origins for cross-origin resource sharing by implementing a default MVC configuration with addCorsMappings. Enable the gateway service to route requests to other services via the Eureka client.
Learn how to access microservices via a gateway at localhost:8765, using a prefix and service routes to call specific rest apis like user service registration.
Run microservices in tenancy order on your local server, starting with the local service then the Zuul gateway, followed by the user and full services to validate the setup.
Demonstrate load balancing across multiple user service instances by creating distinct port-configured instances, running tests via the gateway service, and verifying port availability during refresh.
Prepare the infrastructure for the Kalina site by installing the React command line interface with npm, ensuring npm is globally available, and selecting an editor for development.
Learn how React uses node and npm to create projects with create-react-app, manage dependencies via package.json, and build component-based apps with jsx, props, and state, while handling one-way data flow.
Build a React + Spring Boot microservices client interface, consume data via API calls to list and enroll in courses, and manage user accounts with login, registration, and profile pages.
Create a React project using create react app, install Axios, react-router, bootstrap, and font awesome, and learn to consume server-side microservices and rest api data with Node.js.
Learn to import external dependencies into a React project by configuring the index file, including bootstrap CSS. The lesson covers adding and describing the necessary scripts for configuration.
Explore JavaScript basics and TypeScript option, focusing on var, let, and const scoping and overriding. Learn to use constructors, destructuring for arrays and objects, and compare with == vs ===.
Define user and transaction models in a client-side React setup for microservices, organizing them in a model package and using constructors to describe their fields.
Implement the user service in the user microservice, handling get and post rest API calls with the access module, and manage current user via a behaviour subject and local storage.
Implement a React login component that interacts with a user service, manages state for user, submitted, loading, and error messages, and handles change and login events to navigate home.
Implement a React register component that calls the user service, manages form state, and renders a register form with redirection if a current user exists.
Implement the course service with cross microservice rest calls and describe API endpoints. Create methods for create transaction, filter transactions, filter students, and find all cursus.
Implement a React profile component that fetches the current user and transactions from the user service, redirects to login if needed, and renders user details, a transactions table, and courses.
Implement a home page component in React that lists all courses, enables enrollment via user and course services, displays info or error messages, and stores the course in local storage.
Create a React course detail page that shows course details and enrolled students, fetching data from a class service using the id from props and the course from local storage.
Learn to build React routers with React Router DOM, choose browser, memory, or hash history, define routes with exact attributes for home, login, register, profile, and a parameterized detail page.
In this course, we will implement Microservices with Spring Boot and Spring Cloud Step by Step. In addition, to test our application, we will implement Front-End Client Side with React. Our application will be online course enrollment system. We will implement to this application step by step... In this application, we will also learn a lot of new technologies like:
- Spring Security: Secure connections with Spring Rest API request/response.
- Spring Boot: It will provide simpler and faster way to set up, configure, and run rest API applications with Spring boot, Model View Controller structure will be implemented.
- Data will be presented to client as API call so Spring Rest Controller will be used to handle it.
- MySQL: RDBMS, Database, SQL
- We will map our database tables to objects with hibernate. so we will provide object relational mapping with hibernate.
- For database migration, we will use Liquibase. In liquibase, we will define our database changes and spring will handle it on initialization.
- Eureka Discovery: to connect to other services.
- Spring Zuul Gateway: gate for microservices.
- React: User Interface for microservices.
Integration between client side (frontend) and server-side (backend services) will be provided with rest apis...
Why react? It will be considered with all details. Why don't we choose React alternatives like Vue, Angular?