Добавить
Уведомления

Create a Spring Boot Business Service using @service

In this video we are going to learn how to create a Spring Boot business service using @Service annotation. Before that, we need to understand what is a business service with respect to spring boot? Business service is a Java class annotated with @Service annotation. When spring framework does a class path scan across all the Java classes, the Spring framework will create an object of this class and saves it for reference. So, in the process of creating an application you will have controllers, other services written. All those can use this business service because the spring framework remembers the instance which is created. The service annotation is also called a stereotype annotation because spring will automatically import the beans into the container so their is no need to define them explicitly with XML. We are going to see a demo of this in a little while. The next topic we need to learn now is called Dependency Injection in Spring Boot. This is the most basic concept of the Spring framework. Now, assume you have a web application written which basically consists of many JAVA classes. A class can be dependent on other classes for accessing information through objects. So, Dependency Injection is all about de coupling the classes which helps the classes to operate independently. This will also help us in maintainance of the application and testing.

Иконка канала Java  Инсайд
4 подписчика
12+
16 просмотров
2 года назад
12+
16 просмотров
2 года назад

In this video we are going to learn how to create a Spring Boot business service using @Service annotation. Before that, we need to understand what is a business service with respect to spring boot? Business service is a Java class annotated with @Service annotation. When spring framework does a class path scan across all the Java classes, the Spring framework will create an object of this class and saves it for reference. So, in the process of creating an application you will have controllers, other services written. All those can use this business service because the spring framework remembers the instance which is created. The service annotation is also called a stereotype annotation because spring will automatically import the beans into the container so their is no need to define them explicitly with XML. We are going to see a demo of this in a little while. The next topic we need to learn now is called Dependency Injection in Spring Boot. This is the most basic concept of the Spring framework. Now, assume you have a web application written which basically consists of many JAVA classes. A class can be dependent on other classes for accessing information through objects. So, Dependency Injection is all about de coupling the classes which helps the classes to operate independently. This will also help us in maintainance of the application and testing.

, чтобы оставлять комментарии