Hi guys, in this lesson, we will create user service incident, there is a cycle in model view controller structures. First of all this flight model classes, later called model classes from services, finally called services from controllers and controllers with returned model classes. So, in previous lesson, we describe our user repository. In this lesson, we will call it from service to do it, first of all, we will create service class. But first of all, let's create a new package under our main package. Our package name will be service.
Under service package, we will create user service interface And under service package, we will create user service implementation class. And this class will implement user service. To define user service as service class in Spring Boot, we should add service annotation to it. Later, we will call user repository. To develop dependency injection, we can use auto wired incident. Okay, now we can create our methods.
Our first method will be save users To save user we can call user repository save it. But in here, we need something like encoding to password. You know that this won't be a secure way to do it. We can use password encoder to use passport encoder in sibling we should create being for it. In next lessons we will create being for it Later we will set our password with password encoder that encodes. Okay, that's all about saving money.
Our second methods will be find by username. we can directly call it from user repository. Our third method will be find users by ID list. We can direct a call is from user repository. Okay, that's all about user service implementation. Thank you.