profile 확인용 메소드 추가
This commit is contained in:
parent
9a01ae9f61
commit
fc21756767
@ -3,6 +3,7 @@ package com.interplug.qcast.biz;
|
|||||||
import com.interplug.qcast.config.message.Messages;
|
import com.interplug.qcast.config.message.Messages;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
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.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
@ -12,11 +13,33 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
@RequestMapping("/api/main")
|
@RequestMapping("/api/main")
|
||||||
public class MainController {
|
public class MainController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired Messages message;
|
||||||
Messages message;
|
|
||||||
|
@Value("${front.url}")
|
||||||
|
private String frontUrl;
|
||||||
|
|
||||||
@GetMapping
|
@GetMapping
|
||||||
public String Main() {
|
public MainTestResponse Main() {
|
||||||
return message.getMessage("example.msg.001");
|
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