46 lines
1.1 KiB
Java
46 lines
1.1 KiB
Java
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;
|
|
|
|
@Slf4j
|
|
@RestController
|
|
@RequestMapping("/api/main")
|
|
public class MainController {
|
|
|
|
@Autowired Messages message;
|
|
|
|
@Value("${front.url}")
|
|
private String frontUrl;
|
|
|
|
@GetMapping
|
|
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;
|
|
}
|
|
}
|
|
}
|