Skip to content

Springboot application with an SQL server to perform RESTful operations

License

Notifications You must be signed in to change notification settings

lgsurith/employee-springapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Employee Management System

This is a springboot application with an SQL Server for managing employee detail. It facilitates in adding , retrieving , updating as well as deleting employee records using the VS Code IDE.It also provides RESTful API to perfrom various functionalities as seen in the API Endpoints.

Getting Started :

  • Install the MySQL installer - here
  • Install the MySQL Workbench - here
  • Make sure you have installed the Java Extension Pack as well as Spring Boot Extension Pack in VS Code or download it - here

Setup :

  • Make sure to configure your database in resources/application.properties :
spring.application.name=sql
spring.datasource.url = jdbc:mysql://localhost:3306/<your_database_name>
spring.datasource.username = <your_username>
spring.datasource.password= 
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.jpa.database-platform=org.hibernate.dialect.MySQL8Dialect

# auto updation.
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true

server.port = 8080
  • Make sure to check the POX.XML after setting up the project.
  • Setup MySQL workbench by reffering to yt videos or docs

API Endpoints

  • GET - /employee/getall

    Gets all the users !

    all

  • GET - /employee?id=

    To get the employee by Id(primary key)

    post

  • POST - /employee/add

    To add employee's data in the database by POST functionality.

    id-user

  • PUT -/employee/update/<queries>

    To update any information about the user , query in the changes. Example : www.localhost:8080/employee/id=1?&contact=1234567891

    update

  • DELETE -/employee/delete?id=

    To delete the user by their unique ID in db.

    delete

SQL WorkBench Console :

image

Releases

No releases published

Packages

No packages published

Languages