profile 테스트용 메소드 추가
This commit is contained in:
parent
2f3ee34861
commit
0b70838aa5
@ -3,6 +3,7 @@ package com.interplug.qcast.biz;
|
||||
import com.interplug.qcast.config.message.Messages;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@ -12,11 +13,33 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RequestMapping("/api/main")
|
||||
public class MainController {
|
||||
|
||||
@Autowired
|
||||
Messages message;
|
||||
@Autowired Messages message;
|
||||
|
||||
@Value("${front.url}")
|
||||
private String frontUrl;
|
||||
|
||||
@GetMapping
|
||||
public String Main() {
|
||||
return message.getMessage("example.msg.001");
|
||||
public MainTestResponse Main() {
|
||||
MainTestResponse response =
|
||||
new MainTestResponse(message.getMessage("example.msg.001"), frontUrl);
|
||||
return response;
|
||||
}
|
||||
|
||||
class MainTestResponse {
|
||||
private String message;
|
||||
private String frontUrl;
|
||||
|
||||
public MainTestResponse(String message, String frontUrl) {
|
||||
this.message = message;
|
||||
this.frontUrl = frontUrl;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public String getFrontUrl() {
|
||||
return frontUrl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user