I've already checked similar questions, but none of them wasn't helpful for me:
-
After some investigations, I've found the cause and the way how can I fix this issue.
CodePudding user response:
The cause of issue was the version of the dependency as:
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.3.1.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent>
To fix it, I needed to change the version to higher, for example, to:
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.5.2</version> <relativePath/> <!-- lookup parent from repository --> </parent>
or to another one as:
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.7.5</version> <relativePath/> <!-- lookup parent from repository --> </parent>
but for the usage of
2.7.5
version, you need to be careful and aware, because:getById(ID)
is deprecated and you should use instead getReferenceById(ID).