Skip to content

chaarlie/book-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The following API allows CRUD operations on a Book bean and returns the response in HTML/Plain text.

Tools

  • MySQL Server (port 3306)
  • Maven
  • Java 8

How to run

  1. create database book_db
  2. modify application.properties and type in user/pass for flyway and db user
  3. spring.datasource.url = jdbc:mysql://localhost:3306/book_db?useSSL=false
    spring.datasource.username = root
    spring.datasource.password = Admin123
    
    spring.flyway.url = jdbc:mysql://localhost:3306/mysql
    spring.flyway.schemas = book_db
    spring.flyway.user = root
    spring.flyway.password = Admin123
    
  4. modify pom.xml credentials
  5. <plugin>
      <groupId>org.flywaydb</groupId>
      <artifactId>flyway-maven-plugin</artifactId>
      <version>6.0.7</version>
      <configuration>
          <url>jdbc:mysql://localhost:3306</url>
          <user>root</user>
          <password>Admin123</password>
          <schemas>
              <schema>book_db</schema>
          </schemas>
      </configuration>
    </plugin>
    
  6. in the root dir execute
  7.   mvn clean package
      mvn flyway:migrate
      mvn spring-boot:run
    
  8. app should be running on localhost:8080/books/

Note: you can find here the Postman collection: https://www.dropbox.com/s/pzdk7rcdtnlpnw9/Book%20Operations.postman_collection.json?dl=0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published