From the course: Learning Quarkus
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Solution: Wire HTTP
(upbeat music) - [Instructor] So now, it's time for my solution to this challenge exercise. This time, however, I only did one of the implementations. The implementation that I chose to do was using the REST API and the Cassandra backend. So in order to accomplish this, I made a couple changes to some class files. So let's go into src, main, java and take a look, first of all, at the RoomService. So you'll see, starting on line 22, that I've added a CQL statement for the four methods that I have created. The getAllRooms remained unchanged, but on line 34, I created a method to getRoomsByBedInfo, and I used a PreparedStatement to do that. On line 45, I created an addRoom method, and once again, I used a PreparedStatement. Now, there are other ways to do this in Cassandra with the Java Driver, but again, this was for the purpose of demonstration. It is not the most efficient way to do this. And now, on line 58, I created…
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)
Web-based traffic with Quarkus2m 8s
-
(Locked)
RESTful communication with Quarkus3m 48s
-
(Locked)
RESTful implementation with Quarkus5m 15s
-
(Locked)
REST client with Quarkus5m 17s
-
(Locked)
OpenAPI with Quarkus4m 22s
-
(Locked)
GraphQL with Quarkus5m 19s
-
(Locked)
Challenge: Wire HTTP1m 3s
-
(Locked)
Solution: Wire HTTP4m 3s
-
(Locked)
-