xml형식으로 response받기

This commit is contained in:
haerong22
2020-11-27 17:24:50 +09:00
parent 74a0143945
commit a29a6cb757
2 changed files with 8 additions and 3 deletions

View File

@@ -54,6 +54,11 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<version>2.10.2</version>
</dependency>
</dependencies>
<build>

View File

@@ -14,11 +14,11 @@ import java.util.Locale;
@RestController
public class UserController {
private final UserDaoService userDaoService;
@Autowired
private MessageSource messageSource;
private final MessageSource messageSource;
public UserController(UserDaoService userDaoService) {
public UserController(UserDaoService userDaoService, MessageSource messageSource) {
this.userDaoService = userDaoService;
this.messageSource = messageSource;
}
@GetMapping("/users")