Skip to content

Commit

Permalink
Expect serialVersionUID field now added to Serializable
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Sep 24, 2024
1 parent 0af9942 commit 0313517
Showing 1 changed file with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,15 @@ public void defaults(RecipeSpec spec) {
spec
.recipeFromResources("org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_0")
.parser(JavaParser.fromJavaVersion()
.classpath("spring-context", "spring-data-jpa", "spring-web",
"spring-boot", "spring-core", "persistence-api", "validation-api", "xml.bind-api"));
.classpath(
"spring-context",
"spring-data-jpa",
"spring-web",
"spring-boot",
"spring-core",
"persistence-api",
"validation-api",
"xml.bind-api"));
}

@DocumentExample
Expand All @@ -50,18 +57,18 @@ void xmlBindMissing() {
<groupId>org.springframework.samples</groupId>
<artifactId>spring-petclinic</artifactId>
<version>2.7.3</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.3</version>
</parent>
<name>petclinic</name>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand All @@ -84,18 +91,18 @@ void xmlBindMissing() {
<groupId>org.springframework.samples</groupId>
<artifactId>spring-petclinic</artifactId>
<version>2.7.3</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.13</version>
</parent>
<name>petclinic</name>
<properties>
<java.version>17</java.version>
</properties>
<dependencies>
<dependency>
<groupId>jakarta.xml.bind</groupId>
Expand Down Expand Up @@ -184,6 +191,8 @@ public void setName(String name) {
@Table(name = "specialties")
public class Specialty implements Serializable {
private static final long serialVersionUID = 1;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
Expand Down Expand Up @@ -353,6 +362,8 @@ public void setLastName(String lastName) {
@Table(name = "vets")
public class Vet implements Serializable {
private static final long serialVersionUID = 1;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
Expand Down

0 comments on commit 0313517

Please sign in to comment.