How to Install Lombok

What is Lombok

Lombok is a great way to have boiler-plate code, especially getters and setters generated on the fly for you. The result is a clean and pithy bean definition.

Download the Lombok

Download the Lombok jar from Project Lombok’s home page: ProjectLombok
Navigate (cd) to the downloaded location.
Find and Execute the Lombok Jar as follows from the command line/terminal.

​java -jar lombok-1.16.6.jar
​function helloWorld(str) {
    document.open();
    document.write(str);
    document.close();
}
helloWorld('

Hello, World!

');

installation

The Lombok executable will scan the installation directory to find if an Eclipse installable exists. It might complain the “I can’t find any IDEs on your computer .. use “Specify Location”…”. In this case, you can specify your own location.

To do so, click “Specify Location…”.
​Now navigate to the eclipse.ini file of your eclipse. E.g. When I am using STS, I have my eclipse *.ini located here.
​/Development/sts-bundle/STS/Contents/Eclipse/STS.ini

Proceed with Installation now.

Once done, launch your eclipse. Add lombok to your classpath if not already added. When using maven’s managed dependency, the following dependency can be added.

    
        org.projectlombok
        lombok
        {your-lombok-version-here}
    

Restart Eclipse

Restart your eclipse if the settings have not taken place. That’s it. You are now setup to use all features of lombok in your favorite coding IDE.

Here is a sample class using lombok’s Data property. This will generate getters and setters for you – so a getDay method is available for use – even though it is not visible here.

package com.example.boot.diner;

import lombok.Data;

@Data public class TrivialDinerRequest {

    private String day;

}

Node.js/Express RestAPIs – Angular 14 HttpClient – Get/Post/Put/Delete requests + Bootstrap 4

Node.js/Express RestAPIs – Angular 14 HttpClient – Get/Post/Put/Delete requests + Bootstrap 4

Angular provides the HttpClient in @angular/common/http for front-end applications communicate with backend services. In the tutorial, we show how to build an Angular application that uses the HttpClient to make get/post/put/delete requests with Observable apis to Node.js RestAPIs.

Related posts:
Angular 14 Service – with Observable Data for Asynchronous Operation
Angular 14 Routing/Navigation – with Angular Router Service
Angular 14 Template Driven Form – NgModel for Two-Way Data Binding

Continue reading “Node.js/Express RestAPIs – Angular 14 HttpClient – Get/Post/Put/Delete requests + Bootstrap 4”

Angular 14 + Nodejs/Express – Error Handler HttpClient – catchError + retry example

Angular 14 + Nodejs/Express – Error Handler HttpClient – catchError + retry example

In the tutorial, we show how to handle error from Angular HttpClient with catchError & retry when request fails on the server, or in case of a poor network connection.

Related posts:
Node.js/Express RestAPIs – Angular 14 HttpClient – Get/Post/Put/Delete requests + Bootstrap 4

Continue reading “Angular 14 + Nodejs/Express – Error Handler HttpClient – catchError + retry example”

Angular 14 Http Interceptor – with Node.js RestAPIs

Angular provides HTTP Interception to inspect and transform HTTP requests from your application to the server. In the tutorial, we show how to build an Angular 14 Http Log Interceptor with Node.js RestAPIs.

Related posts:
Error Handler Angular 14 HttpClient – catchError + retry – with Node.js/Express example

Continue reading “Angular 14 Http Interceptor – with Node.js RestAPIs”

Angular 14 Spring Boot JWT Authentication example | Angular 14 + Spring Security + MySQL Full Stack – Part 3: Build Frontend

The tutorial is Part 3 of the series: Angular Spring Boot JWT Authentication example | Angular 14 + Spring Security + MySQL Full Stack. Today we’re gonna build a Angular HTTP Client App that can interact with SpringBoot JWT Authentication Server.

Part 1: Overview and Architecture.
Part 2: Build SpringBoot Backend

Continue reading “Angular 14 Spring Boot JWT Authentication example | Angular 14 + Spring Security + MySQL Full Stack – Part 3: Build Frontend”