2023-05-12 16:23 타 사이트에서 호출 가능하도록 @CrossOrigin 적용하였습니다.
This commit is contained in:
parent
4aa7dd81fe
commit
2b4fbc7773
@ -77,7 +77,7 @@ public class CertifInterceptor implements HandlerInterceptor{
|
||||
lettnLoginLogVO.setDeviceType("P");
|
||||
}
|
||||
|
||||
//program_nm
|
||||
//program_nm - API 값 고정
|
||||
lettnLoginLogVO.setProgrmFileNm("API");
|
||||
lettnLoginLogVO.setMenuNm("API");
|
||||
lettnLoginLogVO.setMenuNo("100");
|
||||
|
||||
@ -6,9 +6,9 @@ import org.json.simple.JSONObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@ -40,6 +40,7 @@ public class AccessKeyRestController {
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
@CrossOrigin("*") // 모든 요청에 접근 허용
|
||||
@RequestMapping(value="/api/accessTest/Test", method= {RequestMethod.GET, RequestMethod.POST})
|
||||
public ResponseEntity<RestResponse> apiAccessTestTestGet(
|
||||
SendMsgVO sendMsgVO
|
||||
@ -54,25 +55,6 @@ public class AccessKeyRestController {
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
/**
|
||||
* api test for post
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
@PostMapping("/api/accessTest/TestPost")
|
||||
public ResponseEntity<RestResponse> apiAccessTestTestPost(
|
||||
SendMsgVO sendMsgVO
|
||||
){
|
||||
|
||||
return ResponseEntity.ok(
|
||||
new RestResponse(
|
||||
HttpStatus.OK
|
||||
, HttpStatus.OK.getReasonPhrase()
|
||||
, LocalDateTime.now()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
/**
|
||||
@ -89,7 +71,10 @@ public class AccessKeyRestController {
|
||||
* 2.plain text
|
||||
*
|
||||
*/
|
||||
@GetMapping("/api/accessKey/SendMsg")
|
||||
|
||||
@CrossOrigin("*") // 모든 요청에 접근 허용
|
||||
//@GetMapping("/api/accessKey/SendMsg")
|
||||
@RequestMapping(value="/api/accessKey/SendMsg", method= {RequestMethod.GET, RequestMethod.POST})
|
||||
public ResponseEntity<RestResponse> apiaccessKeysendMsg(
|
||||
SendMsgVO sendMsgVO
|
||||
){
|
||||
|
||||
Loading…
Reference in New Issue
Block a user