react-axios-example-feature-image

React Axios example – Get/Post/Put/Delete with Rest API

Axios is a promise-based HTTP Client Javascript library for Node.js and Browser. In this tutorial, we will create React example that use Axios to make Get/Post/Put/Delete request with Rest API and JSON data in a React functional component (with Hooks).

Related Posts:
React Custom Hook
Axios Tutorial: Get/Post/Put/Delete request example
React CRUD example with Axios, React Router and Rest API
React Hooks: JWT Authentication & Authorization (without Redux) example
React Hooks + Redux: JWT Authentication & Authorization example

Together with React Query:
React Query and Axios example with Rest API

Read More

Spring Boot JdbcTemplate example with SQL Server

In this tutorial, we’re gonna build a Spring Boot example that use Spring JdbcTemplate to interact with Microsoft SQL Server database. You’ll know:

  • How to configure Spring Data JDBC 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 JdbcTemplate to interact with MSSQL Database (SQL Server)

Exception Handling:
Spring Boot @ControllerAdvice & @ExceptionHandler example
@RestControllerAdvice example in Spring Boot

Unit Test:
Spring Boot – Rest Controller Unit Test with @WebMvcTest

Using Spring Data JPA instead:
Spring Boot, Hibernate, JPA, SQL Server: CRUD Operations example

Read More

Spring Boot JdbcTemplate & PostgreSQL example: CRUD App

In this tutorial, we’re gonna build a Spring Boot Rest CRUD API example that use Spring JdbcTemplate to interact with PostgreSQL database. You’ll know:

  • How to configure Spring Data JDBC 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 JdbcTemplate to interact with PostgreSQL Database

Exception Handling:
Spring Boot @ControllerAdvice & @ExceptionHandler example
@RestControllerAdvice example in Spring Boot

Unit Test:
Spring Boot – Rest Controller Unit Test with @WebMvcTest

Using Spring Data JPA instead:
Spring Boot, JPA/Hibernate, PostgreSQL example

Read More

spring-boot-jdbctemplate-example-mysql-crud-feature-image

Spring Boot JdbcTemplate example with MySQL: CRUD App

In this tutorial, we’re gonna build a Spring Boot Rest CRUD API example that use Spring JdbcTemplate to interact with MySQL database. You’ll know:

  • How to configure Spring Data JDBC 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 JdbcTemplate to interact with MySQL Database

Exception Handling:
Spring Boot @ControllerAdvice & @ExceptionHandler example
@RestControllerAdvice example in Spring Boot

Unit Test:
Spring Boot – Rest Controller Unit Test with @WebMvcTest

Using Spring Data JPA instead:
Spring Boot, Spring Data JPA, MySQL example

Read More

Spring Boot JdbcTemplate example: CRUD Rest API

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

  • How to configure Spring Data JDBC 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 JdbcTemplate to interact with H2 Database

Exception Handling:
Spring Boot @ControllerAdvice & @ExceptionHandler example
@RestControllerAdvice example in Spring Boot

Unit Test:
Spring Boot – Rest Controller Unit Test with @WebMvcTest

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

Read More

deploy-spring-boot-app-aws-beanstalk-feature-image

Deploy Spring Boot App on AWS – Elastic Beanstalk

AWS (Amazon Web Services) is one of the most widely used cloud computing platforms which provides a whole range of managed cloud services. In this tutorial, I will show you step by step to deploy Spring Boot Application with MySQL on AWS EC2 Instance using Elastic Beanstalk (for free).

Related Posts:
Spring Boot, Spring Data JPA: Rest API example
Spring Boot JdbcTemplate with MySQL: Rest API example
Spring Boot Token based Authentication with Spring Security & JWT
– Dockerize with Docker Compose: Spring Boot and MySQL example

Read More

react-custom-hooks-typescript-feature-image

React Custom Hook in Typescript example

In addition to the familiar Hooks like useState, useEffect, useRef…, React also allows us to create custom Hooks with unique features that extracts component logic into reusable functions. Let’s learn how to write a React Custom Hook for API call in Typescript through a simple useAxiosFetch example.

More Practice:
React Hook Form Typescript example with Validation
React Typescript and Axios with API call example
React Table example: CRUD App | react-table 7
React Hooks File Upload example with Axios & Progress Bar
React Typescript Authentication example with Hooks

Javascript version: React Custom Hook tutorial with example

Read More

Spring Boot – Rest Controller Unit Test with @WebMvcTest

Nowadays Unit Test is so important in Software Development, and Spring Boot Test also provides @WebMvcTest annotation to make writing unit test for Rest Controller more simpler. In this tutorial, we’re gonna look at how to apply @WebMvcTest in our Spring Boot Project with JUnit 5 and Mockito.

More Practice:
@DataJpaTest example in Spring Boot
@RestControllerAdvice example in Spring Boot
Spring Boot Token based Authentication with Spring Security example

Associations:
Spring Boot One To Many example with JPA, Hibernate
Spring Boot Many to Many example with JPA, Hibernate

Read More

jpa-repository-query-example-spring-boot-feature-image

JPA Repository query example in Spring Boot | Derived Query

In previous posts, you’ve known how to use JPQL and native Query to retrieve data from the database using @Query annotation. Today, I will show you way to implement Spring Data JPA Repository query in Spring Boot with Derived Query methods:

  • Structure of Derived Query methods
  • Configure Spring Boot application to work with different database
  • JPA find by field, column name, multiple columns
  • JPA query methods for pagination and sorting

Related Posts:
Spring JPA Native Query example
Spring JPA @Query example with JPQL
JPA EntityManager example in Spring Boot
Spring Boot, Spring Data JPA – Rest CRUD API example
Spring Boot Pagination and Sorting example
Spring Boot File upload example with Multipart File
Spring Boot Authentication with Spring Security & JWT
Spring JPA + H2 example
Spring JPA + MySQL example
Spring JPA + PostgreSQL example
Spring JPA + Oracle example
Spring JPA + SQL Server example

Associations:
JPA One To Many example with Hibernate and Spring Boot
JPA Many to Many example with Hibernate in Spring Boot

Read More