From the course: Spring Boot 3 Essential Training
Unlock this course with a free trial
Join today to access over 24,500 courses taught by industry experts.
Calling a web service - Spring Boot Tutorial
From the course: Spring Boot 3 Essential Training
Calling a web service
- [Instructor] So now that we have a full web service with a service layer underneath it, I want to show you how to call that web service and actually get data from it. So I want you to go to the room-clr application, and let's start with the pom.xml. So we're going to add a few things to this. The first one we're going to add is Project Lombok. Then we are going to add Spring Web. Now, this is not the starter, this is just Spring Web itself. We're also going to add spring-boot-starter-json from org.springframework.boot. Now, I want you to go to the room-web-app and open up the pom there real quick. You'll see the build section, it has some Lombok details. We don't get this unless we bring Lombok in when we create it. So the easiest way is just to copy that and replace the build section that we have with that. We now have our dependency structure ready. So I'm going to go ahead and use Maven to import this. Now, let's open up src/main/java. And in the root package, we are going to…
Contents
-
-
-
-
-
-
Configuring embedded Tomcat5m 26s
-
(Locked)
Employing MVC in Spring Boot2m 25s
-
(Locked)
Thymeleaf templates4m 37s
-
(Locked)
Web application with Spring Boot5m 40s
-
(Locked)
Challenge: Generate an MVC webpage55s
-
(Locked)
Solution: Generate an MVC webpage2m 24s
-
(Locked)
Web services with Spring Boot1m 4s
-
(Locked)
Extracting a service layer6m 42s
-
(Locked)
Building the web service4m 40s
-
(Locked)
Challenge: Build a web service43s
-
(Locked)
Solution: Build a web service1m 51s
-
(Locked)
Calling a web service4m 35s
-
-
-