Skip to content

Suggestion: Use Lombok to Reduce Boilerplate Code #1

@Royal-Code-Master

Description

@Royal-Code-Master

Instead of manually writing getter and setter methods in model classes, you can use Lombok annotations like Getter, Setter, and AllArgsConstructor to achieve the same functionality with less code.

Benefits of Using Lombok:
Less Boilerplate Code – No need to manually define getter, setter, or constructor methods.
Improved Readability – The class remains concise and easier to understand.
Easy Maintenance – If you need to add more fields, you don't have to update getters and setters manually.

Example
Below I provide one of your (CreateVirtualParams ) dao class with Lombok

`package dao.params;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@AllArgsConstructor
public class CreateVirtualParams {
private String provider;
private String bankCode;
}
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions