
Compare monolithic and microservices architectures, noting monoliths' drawbacks and microservices' benefits: independent deployment, separate databases, scalability, and easier continuous integration and deployment.
explores microservice architecture for a course and enrollment app, detailing user, crush, and lock services connected via eureka discovery and zuul gateway with spring boot and cloud.
Prepare our server-side infrastructure by setting up MySQL service to run in the background, configure the database workbench with root credentials, and adopt Java 8 for the project.
Install Java 11 as the course baseline, explain long-term support and six-month release cadence, download from Oracle, sign in, install with default settings, and verify Java is ready.
Import a spring boot demo project into intellij using start spring io, extract to desktop, open it, and manage dependencies with gradle or maven, with Java 8 in build gradle.
Install and configure Lombok to enable annotation processing in IntelliJ, so you can avoid writing boilerplate getters and setters on the server side.
Explore Lombok basics and learn how to automate getters, setters, equals, hashCode, and constructors with annotations such as @Data, @Value, @NoArgsConstructor, and @AllArgsConstructor for clean, immutable or flexible Java classes.
Explore how Spring enables dependency injection to build loosely coupled, testable apps using constructor, setter, and field injections, with beans and repositories and key annotations like @Configuration and @Autowired.
Explore user service architecture with CRUD and security in a spring boot microservice. Build a REST API using MVC, Hibernate ORM to MySQL, with Liquibase migrations and Lombok reduces boilerplate.
boot your first spring boot microservice via spring initializr, choosing gradle and version 2.1.6, and add web mvc, security, rest api, flyway, lombok, and a discovery service for inter-service communication.
Configure user service properties to set per-microservice ports, data source credentials, UTC server time zone, optional create database if not exists, and manage Liquibase changelogs with Hibernate ddl-auto=none.
Leverage Hibernate as a Java object-relational mapping tool to map database tables to Java classes using annotations. It defines relationships and uses eager or lazy fetch types to optimize loading.
Create a user model in the model package with an auto-increment id, name, password, and a role relation to a Role class, using data annotations for Liquibase table creation.
Learn basic SQL queries for relational databases, including create database if not exists, create table with columns and data types, insert, delete, truncate, and select with where.
Learn the basics of Liquibase, a SQL migration library for relational databases, describing changesets in XML, JSON, or SQL, with rollback support and database changelog tracking.
Create a Liquibase database changelog with change sets (id, author) using JSON or YAML, build a user table, and integrate it with the base changelog.
Explore JPA repositories in Spring Boot, leveraging auto configuration to perform CRUD operations with built-in methods like findById, save, and findAll, and create custom queries via method names or @Query.
Create a user repository interface extending jpa repository with user class and id. Add a query to find by user name and a query annotation to find names by idealist.
Learn to implement a Spring Boot user service with a service interface and implementation, using the @Service annotation, a password encoder, and repository-based save and find operations.
Explore rest controller basics in Spring Boot, covering http servlets, request and response, and mapping types such as get, post, put, delete, and patch, with response entity.
Create a Spring MVC user controller wired to a user service via dependency injection, exposing rest endpoints for register and get user list with proper response entities and security checks.
Learn how Spring Security works and implement secure login for authenticated rest APIs. Use encrypted headers, UserDetailsService, and a password encoder to control access and login/logout paths.
Implement a custom user details service for Spring Security, override methods to load users by username from a user repository, and configure security accordingly.
Explore Spring Security's default configuration and customization, including form login, http basic, sessions, csrf, and logout, plus cors, public and role-based urls, and the authentication flow.
Explore spring security authentication, covering form login, http filters, basic authorization tokens, and the provider manager flow with the DAOAuthenticationProvider.
Examine spring security authorization architecture with interceptors and access rules (permit all, deny all, authenticated, fully authenticated), and an access decision manager using voters and three strategies (affirmative, consensus, unanimous).
Customize spring security by extending adapters and overriding configure to enable cross-origin sharing, permit public login, register, and error endpoints, and configure authentication for other requests.
Select a starter project, set your language, Spring Boot version, group name, and artifact name, choose dependencies, and generate the project to begin building a similar setup.
Configure application properties for your service by setting broker registration, enabling local servers, and ensuring local search connectivity so other services can connect in the local environment.
Build and run our system by configuring the Eureka server. Follow along to set up and launch the Eureka server within the course context.
Learn to set up a Eureka client for microservices to register with a naming server, configure instance features and lease expiry, and enable discovery in the main class.
Explore discoverable services and instances with a local discovery service, create methods to fetch service ports and list user service instances, and redeploy microservices for testing.
Test the user service by running it and initiating a search to verify its operation. Access server sites from browsers and observe redirects on the server side.
Install Cassandra for the look service, verify that Cassandra is running. Start it if needed, and ensure the proper directory setup.
Explore look service architecture with Spring Boot, MVC, REST API, and Cassandra backend, mapping tables to objects with object-relational mapping, using Lombok data annotations to reduce boilerplate.
Create a new Spring Boot microservice project with Java, add Web, JPA for Cassandra, REST repositories, Cassandra, Eureka discovery, and Lombok, then import into IntelliJ or Eclipse ready for development.
Configure application properties to set the service name, distinct ports for each microservice, and Cassandra integration with a course_keyspace, localhost contact points, port 9042, and create keyspace if not exists.
Create a Cassandra-backed model class in Spring Boot microservice, define id as the primary key, map fields to columns, and use a data annotation for getters, setters, equals and hashCode.
Explore Cassandra primary key concepts, including partition keys, composite keys, and clustering keys, and learn how primary keys enforce uniqueness and why Cassandra lacks auto increment.
Create a summary model class for Cassandra with a lowercase table named summary and a partition primary key. Use Lombok for getters, setters, and equals; define composite and cluster keys.
Configure Cassandra in Spring Boot with a config class that extends abstract Cassandra configuration, setting keyspace name, schema action, keyspace creation and drops, and metrics disabled.
Create a log repository interface that extends a crud repository for cassandra in spring. Use two generic parameters for the model and its id to enable basic crud operations.
Create a summary repository class and interface extending CrudRepository for Cassandra; implement queries like find by id and find by cost with select star from summary, order by and limit.
Create a log service with a service interface and implementation, using dependency injection to save logs and update hit counts, while handling Cassandra constraints with random ids and delete-then-increment.
Create a log controller using mvc in spring; map post requests to save log via log service, returning a response entity with status and body.
Create a Eureka discovery service for microservices, configure the client with application properties, register the client, enable discovery, and prepare for server setup and inter-service communication by application names.
Run and test the log service by starting the microservice and interacting with Cassandra. Learn to call Cassandra from services and verify the Cassandra keyspace.
Develop a Spring Boot microservices course service with MVC structure, a model-repository-controller flow, and Hibernate ORM. Configure database migrations, use Lombok, and expose API calls while integrating with other services.
select and configure a spring initializr microservice project, pick boot version 2.1.6, set group name and artifact name, and add rest api, persistence api, database migration, and service discovery dependencies.
Configure application properties by setting the app name, port, and database credentials, and establish Liquibase change logs and resources for migrations across services and databases.
Create a new model class in the model package, mark it as a database entity, define id, orders, category, and published fields, and implement equals and hashCode with Lombok data.
Create a Hibernate transaction model class mapped to a database table, featuring an auto-generated id and a many-to-one relation to the user, using data annotation and equals and hash methods.
Learn how to implement Liquibase for model classes by creating a database change log with change sets and rollbacks, including a transaction table.
Implement Liquibase test data for the clues table by creating a new team set, defining a master change log and change log template, and including change log complements.
Configure Hibernate entity manager factory and repository in a Spring Boot microservice, managing persistence unit, data source, application properties, and caching.
Create a crud template with an abstract generic entity manager and a generic repository interface, using persistence contexts and the entity manager to perform save, find, and update operations.
Create a course repository using hql, with interface and implementation, marked transactional; write queries to filter courses by free text and to support a second query.
Create the transaction repository interface and implementation, then write HQL queries to find all transactions by user id and by clues id.
Create Feign clients in the core service to call look service and user service, defining interfaces and annotating with @FeignClient, then inject and use them in the controller.
Master the mvc cycle in spring with model, service, controller. Create a rest controller using a feign client to filter transactions by user id and find popular courses.
Define and enable origins for cross-origin resource sharing by configuring a default MVC configuration class and overriding the addMappings method to allow all origins for testing.
Enable the Eureka client and configure service discovery so microservices communicate by application name, register and list discovery service instances and ports.
Run our micro service in this lesson to demonstrate a course service test within the angular 7 plus spring boot and cloud microservices framework.
Create a gateway microservice using the Netflix Zuul library to provide a single gateway path for all microservices, built with Spring Boot 2.1.6 and Java.
Configure application properties for a Spring Boot microservices app, define api routes for user, pet, and course log services, and enable a proxy with Eureka and load balancing.
Enable eager loading to address timeout problems and set key properties. Then change the default connection and lead time out durations to optimize performance.
Define allowed origins for cross-origin resource sharing using a dedicated configuration class, override the CORS mappings, and enable proxy and CORS in the main class, with gateway service routing.
Launch and test your Zuul gateway service by running your microservice in this lesson, building hands-on skills for microservice deployment and gateway integration.
Navigate the gateway path to reach microservices via the zoo gateway at localhost:8765, using the api prefix to access the user, log, and calls services and their registration rest api.
Create multiple user service instances with different ports to demonstrate load balancing and test via the gateway service, observing requests routed to available ports.
Prepare the client-side infrastructure by installing the angular command line interface via an npm package and defining the npm version for setup.
Explore Angular basics by using components, directives, and services created with the command line interface; manage dependencies with npm and package.json, and apply lifecycle hooks and pipes.
Build a client-side user interface for microservices, enabling login and registration, course listing with enrollment, and details for courses and profiles by consuming user and course services.
Build an angular client to consume microservices data, set up the project, install angular material and bootstrap, and generate login, register, profile, cruise, and course pages with authentication.
Configure Angular Material by importing and providing modules for components, enabling hammer gestures, and setting up icons, assets, and login and register forms with API calls.
Explore Angular model-view-controller structure by implementing TypeScript model classes, connecting them with services and controllers, and sending post and get requests to microservices via a gateway API.
Create five angular routes in the app routing module, set login as the default with redirect, and implement parameterized routes for profile, list, and other pages using slash parameters.
Implement authentication and logging in angular using the mvc structure, building a user model, services, and a rest API–driven authentication flow with encrypted headers and login/logout navigation.
Implement a user profile controller in Angular by wiring authentication service, user model, and router to show current user details and enable logout via local storage clearance.
Implement user registration by calling the authentication service's register method and sending a rest api request to the user service, then navigate to login page via router and register controller.
Implement course list and enrollment using the model–view–controller structure in Angular, defining course and transaction models, core and service layers, observable REST calls, and router navigation to course details.
Develop an Angular MVC based course detail page using log and IP models, with a log service calling REST APIs to create logs, fetch summaries, and identify client IP.
Implement popular and filter courses in the core service by creating two methods that query the course microservice API, update the data source table, and map router parameters for search.
Implement an emitter service with a listener and trigger to call search methods from app components, subscribing to events and navigating to course list for all, popular, and field courses.
Create a bootstrap navigation bar in the app component with login, register, profile, and search features, display current user from local storage, and wire login events via an emitter service.
In this course, we will learn Microservices With Spring Boot and Spring Cloud on server side. In Client Side, we will learn Angular 7. Our project template goes on Github project so you can reach every component of project from Github repository. You know that Microservices is a popular topic for current years.
Microservices - also known as the microservice architecture - is an architectural style that structures an application as a collection of services that are
Highly maintainable and testable
Loosely coupled
Independently deployable
Organized around business capabilities.
The microservice architecture enables the continuous delivery/deployment of large, complex applications. It also enables an organization to evolve its technology stack.
Spring Cloud — which builds on top of Spring Boot, provides a set of features to quickly build microservices. It’s very smart to know how to get them working together, can quickly setup services, with minimal configurations.
Spring Boot
Spring Cloud
Spring Zuul
Spring Eureka
Angular 7
Spring Netflix service discovery
Client services
Server services
Cassandra
MySQL
Liquibase
NoSQL
Why did we choose Angular? Not Vue, React or other script languages?...
Angular provides MVC architecture, we will see the details of it...
Why did we choose different database solutions? Microservices support them?...
Spring Cloud Solutions: Spring Zuul, Eureka Discovery etc.
How does Spring security handle the secure connection? Basic Authentication or Bearer Authentication?