Lombok Data annotation isn't processing getters and setters for Entity class in controller endpoint when returning response list with SpringBoot 3.4.4 with the default configurations used from SpringInitializr
-
Controller class:
@GetMapping("/products") public List<Product> getProducts(){ return productService.getAllProducts(); }
-
pom.xml
https://gist.github.com/hrajpal96/d5e88d1a7c435292a51805fa44905c6d
The controller uses service which uses an extension of JpaRepository, the results are fetched fine till controller but are returned as empty responses list with the expected row count
[{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}]