tut-rest icon indicating copy to clipboard operation
tut-rest copied to clipboard

Package imports for Jakarta are not correct with latest version of Spring Boot

Open fascynacja opened this issue 2 years ago • 0 comments

I came to this repo from tutorial: https://spring.io/guides/tutorials/rest/. In the repo and tutorial there is usage of Java EE libriaries for persistence. Anyhow when I try to use the newest version of Spring (3.1.0-SNAPSHOT) I do not see the persistence-api dependency. It looks like there is Jakarta persistence on the classpath. I was trying to follow the tutorial and I have failed on the first step because of that. Maybe it would be helpfull to add a small mention in the tutorial that in the newest version of Spring the imports need to look like:

import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;

fascynacja avatar Apr 12 '23 12:04 fascynacja