Code Monkey home page Code Monkey logo

restful-api-dbms's Introduction

A REST API of DBMS implement Bootstrap

Here for skip to the over-view.

This application build using Spring Boot.

This application is implements:

  1. Spring-data-jpa which allow us to configure this application with MySql.
  2. Bootstrap for makes every page more responsif.
  3. Thymeleaf as a Java library to transform data from the server.

Learn more about Thymeleaf:

Additional

To run this application on host or our local computer, at least we need:

  • JDK 17
  • mysql

Getting Started

Instead of running the application straight away, it would be better if we ensure a connection to the database first.

In application.properties as a default configure the connection to the database as follows:

# JDBC driver SQL configuration
spring.datasource.url=jdbc:mysql://localhost:3306/newuserdb
spring.datasource.username=root
spring.datasource.password=admin
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.show_sql=true

The default schema of the newuserdb :

mysql> use newuserdb;
Database changed
mysql> desc user;
+------------+-------------+------+-----+---------+----------------+
| Field      | Type        | Null | Key | Default | Extra          |
+------------+-------------+------+-----+---------+----------------+
| id         | int         | NO   | PRI | NULL    | auto_increment |
| email      | varchar(45) | NO   | UNI | NULL    |                |
| first_name | varchar(45) | NO   |     | NULL    |                |
| last_name  | varchar(45) | NO   |     | NULL    |                |
| password   | varchar(15) | NO   |     | NULL    |                |
| enabled    | bit(1)      | NO   |     | NULL    |                |
+------------+-------------+------+-----+---------+----------------+
6 rows in set (0.81 sec)

After database has conecting successfully, run the main class src/main/java/DBMS/MydbmsApplication.java

Open new tab on Your browser type http://localhost:8080.

Over-view

This is a Rest Api for a DBMS built using Spring-Boot. This aplication provides operation such as Create, Read, Update, and Delete. These are the four basic operations used to manage data in to the MySql.

Building this application involves: Spring Boot Web, Spring Data JPA & Hibernate, MySQL Database, Thymeleaf, HTML5 & Bootstrap, JUnit 5 & AssertJ, Spring Data JPA Test. All steps in building this application can be followed here.

restful-api-dbms's People

Contributors

mahesri avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.