@RestControllerAdvice example in Spring Boot

In this tutorial, we’re gonna look at an Spring Boot example that uses @RestControllerAdvice for exception handling in Restful API. I also show you the comparison between @RestControllerAdvice and @ControllerAdvice along with the use of @ExceptionHandler annotation.

Related Posts:
– @RestController vs @Controller
– Spring Boot, Spring Data JPA – Rest CRUD API example
– Spring Boot Pagination & Filter example
– Spring Boot Sort/Order by multiple Columns
– Documentation: Spring Boot + Swagger 3 example (with OpenAPI 3)
– Caching: Spring Boot Redis Cache example
– Validation: Spring Boot Validate Request Body

More Practice:
– Spring Boot Multipart File upload example
– Spring Boot Token based Authentication with Spring Security & JWT

Unit Test:
– Spring Boot Unit Test for JPA Repository
– Spring Boot Unit Test for Rest Controller

Read More

Spring Boot Download CSV file from Database example

A CSV (comma-separated values) file is a plain text file that contains data which format is described in RFC4180. Each row has a number of fields, separated by commas. Each line should contain the same number of fields throughout the file. In this tutorial, I will show you how to build Spring Boot download CSV file Rest API example that exports data from MySQL Database table using & Apache Commons CSV.

Related Posts:
– Spring Boot: Upload & Read CSV file into MySQL Database | Multipart File
– Spring Boot Multipart File upload example
– How to upload multiple files in Java Spring Boot

Excel file instead: Spring Boot: Download Excel file example

Deployment:
– Deploy Spring Boot App on AWS – Elastic Beanstalk
– Docker Compose: Spring Boot and MySQL example

Read More

Spring Boot + React + MySQL: CRUD example REST APIs

In this tutorial, we will learn how to build a full stack Spring Boot + React.js + MySQL example with a CRUD App. The back-end server uses Spring Boot with Spring Web MVC for REST APIs and Spring Data JPA for interacting with MySQL/PostgreSQL database. Front-end side is made with React, React Router, Axios & Bootstrap.

Related Posts:
– Spring Boot + React Typescript example
– React + Spring Boot: Pagination example
– Spring Boot + React: Login example with JWT Authentication & Spring Security
– React Upload/Download Files to/from Spring Boot Rest Apis

Run both projects in one place:
How to integrate React.js with Spring Boot

Other Databases:
– Spring Boot + React + PostgreSQL example: Build a CRUD App
– Spring Boot + React + MongoDB example: Build a CRUD Application

Read More

Server side Pagination with Node.js and Angular

In this tutorial, I will show you how to build a full-stack (Angular 17/16/15/14/13/12/11/10/8 + Node.js Server side Pagination) example. The back-end server uses Node.js + Express for REST APIs, front-end side is an Angular App with HTTPClient.

Related Posts:
– Angular + Node.js Express + MySQL example: CRUD App
– Angular + Node.js Express + PostgreSQL example: CRUD App
– Angular + Node.js Express + MongoDB example: CRUD App
– Angular 17 + Node.js Express: File Upload example
– Angular 17 + Node.js Express: JWT Authentication & Authorization example

Read More