Skip to content

Commit 99040c4

Browse files
committed
remove gson
1 parent 1cb252d commit 99040c4

2 files changed

Lines changed: 1 addition & 7 deletions

File tree

‎spring-cloud/spring-cloud-security/personresource/pom.xml‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@
4343
<groupId>org.springframework.security</groupId>
4444
<artifactId>spring-security-jwt</artifactId>
4545
</dependency>
46-
<dependency>
47-
<groupId>com.google.code.gson</groupId>
48-
<artifactId>gson</artifactId>
49-
</dependency>
5046
</dependencies>
5147

5248
<dependencyManagement>

‎spring-cloud/spring-cloud-security/personresource/src/main/java/com/baeldung/controller/PersonInfoController.java‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ public class PersonInfoController {
1414
@GetMapping("/personResource")
1515
@PreAuthorize("hasAnyRole('ADMIN', 'USER')")
1616
public @ResponseBody String personInfo() {
17-
Gson gson = new Gson();
18-
String person = gson.toJson(new Person("abir", "Dhaka", "Bangladesh", 29, "Male"));
19-
return person;
17+
return new Person("abir", "Dhaka", "Bangladesh", 29, "Male");
2018
}
2119
}

0 commit comments

Comments
 (0)