- Replace
java.util.Date
withjava.time.LocalDate
orjava.time.LocalDateTime
- Replace
spring.datasource.url=jdbc:h2:mem:testdb;NON_KEYWORDS=USER
with@Table(name = "USER_DETAILS")
and also column name should beuserName
- Replace H2
sysdate()
function(deprecated) withCURRENT_DATE()
function - Replace
javax
withjakarta
in model or entities fromSpring Boot 3.0.0
version - Replace
private static List<User> users = new ArrayList<>();
withprivate static final List<User> users = new ArrayList<>();
- Replace all generics with respective type for example
List list = new ArrayList<>();
replace withList<DataType> list = new ArrayList<>();
- Integrate Project Lombok library https://projectlombok.org/features/all -- Optional
serialVersionUID
can be annotated with@Serial
annotation, for example:
@Serial
private static final long serialVersionUID = 3518170101751491969L;