spring-guides / tut-rest

Building REST services with Spring :: Learn how to easily build RESTful services with Spring

Home Page:https://spring.io/guides/tutorials/rest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

fascynacja opened this issue · comments

commented

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;

Thanks @fascynacja for the issue. This should be fixed with PR #127. If you still have problems please reply to this issue or open a new one.