Code Monkey home page Code Monkey logo

spring-boot-sql-server's Introduction

Spring Boot + SQL Server example: CRUD Operations Rest API

For more detail, please visit:

Spring Boot CRUD Operations example with SQL Server

In this tutorial, we're gonna build a Spring Boot Rest CRUD API example with Maven that use Spring Data JPA to interact with H2 database. You'll know:

  • How to configure Spring Data, JPA, Hibernate to work with Database
  • How to define Data Models and Repository interfaces
  • Way to create Spring Rest Controller to process HTTP requests
  • Way to use Spring Data JPA to interact with H2 Database

Front-end that works well with this Back-end

Axios Client / Javascript Fetch API Client

Angular 8 Client / Angular 10 Client / Angular 11 Client / Angular 12 Client / Angular 13 Client / Angular 14 Client / Angular 15 Client

Vue 2 Client / Vue 3 Client / Vuetify Client

React Client / React Redux Client

More Practice:

Spring Boot File upload example with Multipart File

Spring Boot Pagination & Filter example | Spring JPA, Pageable

Spring Data JPA Sort/Order by multiple Columns | Spring Boot

Spring Boot Repository Unit Test with @DataJpaTest

Deploy Spring Boot App on AWS โ€“ Elastic Beanstalk

Exception Handling:

Spring Boot @ControllerAdvice & @ExceptionHandler example

@RestControllerAdvice example in Spring Boot

Other databases:

Spring Boot JPA + H2 example: Build a CRUD Rest APIs

Spring Boot JPA + MySQL - Building Rest CRUD API example

Spring Boot JPA + PostgreSQL - Building Rest CRUD API example

Security:

Spring Boot + Spring Security JWT Authentication & Authorization

Run both Back-end & Front-end in one place:

Integrate Angular with Spring Boot Rest API

Integrate React.js with Spring Boot Rest API

Integrate Vue.js with Spring Boot Rest API

Run Spring Boot application

mvn spring-boot:run

spring-boot-sql-server's People

Contributors

tienbku avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

spring-boot-sql-server's Issues

Class TutorialController @PostMapping createTutorial Logic Bug

Fiddling around with this project for work, The TutorialController.java @PostMapping createTutorial function contains a logic bug.
TutorialController.java, Line 66-67 will always force the published bool to be false:
Tutorial _tutorial = tutorialRepository
.save(new Tutorial(tutorial.getTitle(), tutorial.getDescription(), false));

This in my opinion should be updated to:
Tutorial _tutorial = tutorialRepository.save(new Tutorial
(tutorial.getTitle(), tutorial.getDescription(), tutorial.isPublished()));

For big datasets this will corrupt your "published" boolean column and will result in one having to manually run SQL commands to update your dataset should you choose to hook it to a localdb.

Failed to connect to database.

The TCP/IP connection to the host localhost, port 1433 has failed. Error: "connect timed out. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".

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.