From the course: Spring Boot and React: Build Scalable and Dynamic Web Apps
Unlock the full course today
Join today to access over 24,600 courses taught by industry experts.
Setting up for web
From the course: Spring Boot and React: Build Scalable and Dynamic Web Apps
Setting up for web
- [Instructor] So now we're going to take a little bit of a diversion and set up some things in our project that we're going to consume in a later video, but then sort of build the structure of how we would build a web service today. And we need to get that done before we build the intermediate service. So let's jump into code and make that happen. The first thing I want you to do is go to src main java, and underneath your root package I want you to create a new package called web.errors. And we're going to create a couple of new classes in here. So the first one that we're going to create is a NotFoundException. We're going to annotate this with the response status of HttpStatus.NOT_FOUND. We will extend RuntimeException, and I am going to override the first four methods of exception. Now we're going to do the same thing, but we're going to create this one called BadRequestException. This will have a ResponseStatus of…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Understanding the architecture2m 49s
-
(Locked)
Data access3m 46s
-
(Locked)
Setting up for web2m 52s
-
(Locked)
Build a service5m 57s
-
(Locked)
Challenge: Data access1m 41s
-
(Locked)
Solution: Data access1m 20s
-
(Locked)
REST API6m 16s
-
(Locked)
Challenge: REST1m 31s
-
(Locked)
Solution: REST1m 34s
-
(Locked)
-
-