
Explore the architecture of a product ordering app with api gateway, products service, and transaction service, secured by Spring security and jwt, deployed to Heroku with PostgreSQL and H2.
Compare monolithic and microservices architectures, outlining how microservices slice large projects into independent modules with own model, own database, and own dependencies, enabling independent deployment, scalability, and easier troubleshooting.
Install Java 11 as the minimum supported long-term version, then download from Oracle, sign in, and install with default settings to start using Java.
Install the IntelliJ community version for free, compare it with licensed version, and note features like TypeScript support and database tools; consider alternatives such as Eclipse, Visual Studio Code, NetBeans.
Download and install PostgreSQL across operating systems, launch and configure by default, set a password, and manage with pgAdmin from localhost.
Search for Git on Google, open the official downloads page, and download the version for your operating system. Install it with default configurations.
Install Lombok in IntelliJ and enable annotation processing in settings to support server-side code and getter and setter methods.
Install Postman and register to begin api testing. Create and test api endpoints in your project with Postman, using get, post, put, and patch methods and simple authorization headers.
Discover how Spring Boot enables dependency injection to build loosely coupled apps using interfaces, repositories, services, and components. Utilize constructor, setter, and field injection, and apply configuration and transactional annotations.
Learn how rest controllers expose HTTP methods in Spring Boot, using get, post, put, patch, and delete mappings to perform CRUD operations and return responses via ResponseEntity.
Learn SQL queries and crud operations on relational databases, including creating databases and tables, defining primary keys, and performing insert, delete, and select statements.
Discover how lombok uses getter, setter, data, and value annotations to auto-generate equals, hashCode, toString, and immutable classes, with no-args and all-args constructors.
Explore Git as a version control system, distinguish Git from GitHub, and learn key workflows—repositories, branches, commits, pushes, merges, and collaboration via pull requests.
Explore how the @RequestParam annotation captures query, form, and header parameters in Spring, demonstrate specifying parameter names, optionality, and default values to control rest api inputs.
Explore how the @PathVariable annotation binds template URI segments to method parameters in Spring, including default names, optional settings, and customizing variable names.
Learn how the @RequestBody annotation binds the HTTP request body to a domain object using HTTP message converters, JSON content types, and Jackson.
Explore the product service architecture for a microservice online shopping system, detailing CRUD operations, Springboard-driven REST API, MVC structure, PostgreSQL, Hibernate, Lombok, and Gradle.
Create a Spring Boot project using Spring Initializr, choose Gradle, Java 11, and dependencies such as security, JPA, REST repositories, PostgreSQL, and Lombok to build a microservice.
Learn why we choose Gradle for Spring Boot microservices, highlighting its ease of configuration, superior performance, and incremental builds that run only changed tasks.
Create a PostgreSQL database with PgAdmin, including a login role and schema setup, and learn how schemas and tables are organized, with notes on eventual deployment to Heroku.
Configure application properties for microservices to set server ports, PostgreSQL data source details, database name, credentials, active schema, and Hibernate DDL auto options such as update or create.
Create a product entity class as a JPA entity mapped to a database table, with id generation identity and fields name, price, and create, using Lombok for getters and setters.
Explore id generation strategies in JPA and Hibernate, including auto, identity, sequence, and table generators, with practical examples and repository testing.
Create a product repository interface that extends a JPA repository to auto-handle save, update, delete, and find operations, including find by name and custom queries via annotations.
Create a Spring product service to encapsulate business logic between controllers and repositories, implementing save, delete by id, and find all via a service interface and implementation.
Implement a rest controller for products, map endpoints under /api/product, inject the product service, and expose create, delete, and list operations via appropriate request mappings.
Learn how authentication works in Spring Security, including HTTP filters, basic authentication with base64 credentials, and the role of authentication providers and the provider manager in validating users.
Explore how Spring Security implements authorization using interceptors and URI controls like permit all, deny all, rule-based access for authenticated users, and how access decision managers and voters determine access.
Discover how Spring security handles authentication and authorization through default and customized configurations. Explore login, logout, form login, basic authentication, sessions, csrf protection, cors, and access control rules.
Configure in-memory security for the product microservice using Spring security, enabling basic authentication, encoding passwords, and customizing http security to protect endpoints.
Install and explore Postman to build, test, and modify APIs, send various HTTP requests, save APIs, and convert calls to code in multiple languages.
Explore running a Spring Boot application in multiple ways: from the main class with environment variables, via a run configuration, or with Gradle bootRun using profiles.
Test product microservice endpoints with Postman by starting the Spring Boot app from the main class, posting to /api/product, and fetching all or deleting by id with basic auth.
Configure Spring Boot with development and production profiles, switch active profiles via environment variables, and use profile-specific application properties and placeholders for cloud deployment on services like Heroku.
Explore the Heroku dashboard, learning about dyno types, add-ons, and deployment pipelines, including GitHub deployments and review apps, with metrics, rollback, and full app management.
Configure Heroku project using app.json and Procfile, specifying app name, buildpack, and environment variables. Define process types like web and worker, then run a gradle build to produce a jar.
Create and initialize a GitHub repository for your project, configure public or private access, commit changes with messages, and push to a remote branch via terminal.
Deploy the product microservice to Hiroku via GitHub, create a PostgreSQL database, and configure production environment variables in application properties. Then deploy from master and test the endpoints with Postman.
Hi guys,
In this course, we will talk about the architecture of our project.
In this course, we will create a project like product-ordering-application.
When we say product-ordering-application, we can think of it like that we will have a product-list page such as book-list, food-list or dress-list. Somehow users or customers will see these product-lists and they can buy one of the products. Of course, at the end of it, this transaction will be logged.
Actually, in our application, we will try to implement these processes with different microservices.
To implement this application, we will use three different microservices.
Our microservices will be api-gateway, product-service and transaction-service.
In api-gateway, we will manage APIs. This microservice will be a gateway for the whole application. To access the other services, we will use this microservice. In this microservice, we will handle user-management also. We will authorize users and if the users are authorized, other services can be available.
In product-service, we will manage product CRUD operations. This service will be a product-management-service.
In transaction-service, we will manage transaction CRUD operations. This service will store the logs coming from the product purchases. For example, the UserX bought the ProductX on DateX etc.
Our microservices dependency process will be like that. First of all, the client can access the api-gateway. To access the api-gateway, the client should pass the login process. Then other services will be accessible over the api-gateway.
Spring-security will be one of the main topics in our application. Also, we will use JWT to provide security.
Here, the important point is, we will also use secure connections among microservices. To provide it, we will use secure-key-tokens.
As a database, we will use PostgreSQL and H2Database. We can use other databases also but at the end of it we will deploy our codes to Heroku. These databases can be used on Heroku freely so we chose these databases.
We will provide connection between microservices with Retrofit library. Retrofit will handle all our networking issues.
For our all services, we will create cloud deployment with Heroku. Heroku is an amazing free framework. We can deploy our spring-boot projects with some configuration over github easily. So At the end of the course, we will have an application on production and we will have a code on github that is accessible by everyone.
In addition to these libraries, In our project, we will use lots of technologies like Spring Boot, Spring Security, Hibernate, PostgreSQL, Gradle, Lombok, Heroku etc.
Of course here, our main library will be Spring-boot. It will provide a simpler and faster way to set up, configure and database to provide data.
At the end of each microservices, we will test our applications with Postman. Postman is another amazing tool to debug networking.
That's all about the microservices architecture of our project.
Thank you.