GithubHelp home page GithubHelp logo

springproject's Introduction

Java Spring Project

In this project, a sample application for using spring with java is described. For this example, two linked tables will be created, named company and employee. Adding, deleting, updating and listing operations will be done to these tables using Postman and MYSQL.

Requirements

  • Intellij Idea
  • MYSQL
  • Postman

Creating a project in Intellij Idea

Note : Due to the some version errors Project SDK verison must be earlier than version 13.

With Spring Initializr, adjustments are made as in the figure and the following should be added as Dependencies:

  • Lombok,
  • Spring Web,
  • H2 Database,
  • Mysql Driver,
  • Spring Data JPA

Within the project: Entities are created for the company and the employee. The connection between these entities is made one to M. In other words, each company can have more than one employee, but an employee cannot have more than one company. Then the interface repository is created for both entities.

โ— The database connection must be set in the data source and drivers section on the left. Then, separate controller files and service files are created for the Company and Employee, where the control will be provided for these two entities. After the project is run, the entities tables created in the project are displayed as empty on MySql Workbench.

Now we can add information to our tables with the post operation via postman. ๐ŸŽ‰

Postman

  • Write an employee information in Json format in Postman and perform the post process.

    { "name": "Mathew", "surname": "Sparkle", "company":"Google", "email":"[email protected]", "phone":"9999999999" }

springproject's People

Contributors

elifmeseci 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.