Creating User Info Microservice
Start course
Difficulty
Beginner
Duration
1h 18m
Students
85
Description

In this course, we will learn the concepts of microservice and spring framework with a focus on Cloud.

Learning Objectives

  • Learn about Cloud

Intended Audience

  • Beginner Java developers
  • Java developers interested in learning how to Build and Deploy RESTful Web Services
  • Java Developers who want to develop web applications using the Spring framework
  • Java Developers who want to develop web applications with microservices
  • Java Developers who wish to develop Spring Boot Microservices with Spring Cloud

Prerequisites

  • Basic Java knowledge
Transcript

Create User Info Microservice. Hello, dear friends. In this video, we will construct a user info microservice project. Actually, it is not a REST service. It is a project used for getting system info services and serving this info to users through the UI layer. It consists of three parts: first for implementing basic user model class and infrastructure, second for integration with system info microservice, and the third for user interface with JSF. This is the first part. Open the Open Liberty starter page and generate a new project. Write com.user.info as a group and user-info as an artifact. There's no need to change the others. Okay, generated. Unzip it. Let's import it. Let's start to code our project. First, I want to create a SystemModel class. It will define the fundamental properties of system info.

All right, created. It is a simple POJO class. Now I am creating a LoginBean class. This class specifies the basic properties of a user. I've written a named annotation because I will use it on the JSF page. I will create a doLogin() function to handle login operations. Now I will write the buildJwt() function to generate JWT. I will use IBM WebSphere libraries. And lastly, I will define the getRoles() function. Now I will create a NoCacheFilter class. It helps us prevent caching on the web page. And lastly, I will create a SessionUtils class. It will include some helper methods that enable us to get info about user sessions. All right, we will define all the required classes for this video. In the next video, we will integrate the system info microservice and the user info microservice projects. So, I'll see you in the next lesson dear friends.

 

About the Author
Students
1922
Courses
64
Learning Paths
4

OAK Academy is made up of tech experts who have been in the sector for years and years and are deeply rooted in the tech world. They specialize in critical areas like cybersecurity, coding, IT, game development, app monetization, and mobile development.