refactor: Controller -> RestController

This commit is contained in:
hylee 2023-02-14 09:46:05 +09:00
parent a1198f6cd6
commit 720d08ed0e

View File

@ -1,28 +1,26 @@
package com.itn.mjonApi.mjon.member.web; package com.itn.mjonApi.mjon.member.web;
import com.itn.mjonApi.cmn.msg.RestResponse; import com.itn.mjonApi.cmn.msg.RestResponse;
import com.itn.mjonApi.mjon.member.service.MemberService; import com.itn.mjonApi.mjon.member.service.MemberService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController;
import java.util.List; @RestController
public class MemberRestController {
@Controller
public class MemberController { @Autowired
private MemberService memberService;
@Autowired
private MemberService memberService; @GetMapping("/member/mymsg")
public ResponseEntity<RestResponse> mymsg(){
@GetMapping("/member/mymsg") return ResponseEntity.ok(memberService.findAll());
public ResponseEntity<RestResponse> mymsg(){ }
return ResponseEntity.ok(memberService.findAll());
} @GetMapping("/member/mymsg_2")
public ResponseEntity<RestResponse> mymsg2(){
@GetMapping("/member/mymsg_2") return ResponseEntity.ok(memberService.findAll2());
public ResponseEntity<RestResponse> mymsg2(){ }
return ResponseEntity.ok(memberService.findAll2());
} }
}