Skip to content

Commit 60339e0

Browse files
Update src/testWithSpringBoot_1_5/java/org/openrewrite/java/spring/NotRepeatSpringAnnotationsInSubclassesTest.java
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent e9e4c22 commit 60339e0

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

src/testWithSpringBoot_1_5/java/org/openrewrite/java/spring/NotRepeatSpringAnnotationsInSubclassesTest.java

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -37,29 +37,30 @@ void removeLeadingAutowiredAnnotation() {
3737
rewriteRun(
3838
java(
3939
"""
40-
import org.springframework.web.bind.annotation.PathVariable;
41-
import org.springframework.web.bind.annotation.PostMapping;
42-
import org.springframework.web.bind.annotation.RequestBody;
43-
44-
public interface UserApi {
45-
46-
@PostMapping("/users/{id}")
47-
String updateUser(
48-
@PathVariable("id") Long id,
49-
@RequestBody UserData request
50-
);
51-
52-
class UserData {
53-
private String firstName;
54-
private String lastName;
55-
56-
public String getFirstName() {return firstName;}
57-
58-
public void setFirstName(String firstName) {
59-
this.firstName = firstName;
60-
}
61-
62-
public String getLastName() {
40+
import org.springframework.web.bind.annotation.PathVariable;
41+
import org.springframework.web.bind.annotation.PostMapping;
42+
import org.springframework.web.bind.annotation.RequestBody;
43+
public interface UserApi {
44+
@PostMapping("/users/{id}")
45+
String updateUser(
46+
@PathVariable("id") Long id,
47+
@RequestBody UserData request
48+
);
49+
class UserData {
50+
private String firstName;
51+
private String lastName;
52+
public String getFirstName() {return firstName;}
53+
public void setFirstName(String firstName) {
54+
this.firstName = firstName;
55+
}
56+
public String getLastName() {
57+
return lastName;
58+
}
59+
public void setLastName(String lastName) {
60+
this.lastName = lastName;
61+
}
62+
"""
63+
),
6364
return lastName;
6465
}
6566

0 commit comments

Comments
 (0)