Creating a basic RESTful application
While command-line applications do have their place and use, most of today's application development is centered around web, REST, and data services. Let's start with enhancing our BookPub application by providing it with a web-based API in order to get access to the book catalogues.
We will start where we left off in the previous chapter, so there should already be an application skeleton with the entity objects and a repository service defined and a connection to the database configured.
How to do it…
- The very first thing that we will need to do is add a new dependency to build.gradlewith thespring-boot-starter-webstarter to get us all the necessary libraries for a web-based functionality. The following snippet is what it would look like:dependencies { compile("org.springframework.boot:spring-boot-starter-data-jpa") compile("org.springframework.boot:spring-boot-starter-jdbc") compile("org.springframework...
 
                                             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
     
         
                 
                 
                 
                 
                 
                 
                 
                 
                