refactor: Controller -> RestController
This commit is contained in:
parent
a1198f6cd6
commit
720d08ed0e
@ -1,28 +1,26 @@
|
||||
package com.itn.mjonApi.mjon.member.web;
|
||||
|
||||
import com.itn.mjonApi.cmn.msg.RestResponse;
|
||||
import com.itn.mjonApi.mjon.member.service.MemberService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Controller
|
||||
public class MemberController {
|
||||
|
||||
@Autowired
|
||||
private MemberService memberService;
|
||||
|
||||
@GetMapping("/member/mymsg")
|
||||
public ResponseEntity<RestResponse> mymsg(){
|
||||
return ResponseEntity.ok(memberService.findAll());
|
||||
}
|
||||
|
||||
@GetMapping("/member/mymsg_2")
|
||||
public ResponseEntity<RestResponse> mymsg2(){
|
||||
return ResponseEntity.ok(memberService.findAll2());
|
||||
}
|
||||
|
||||
}
|
||||
package com.itn.mjonApi.mjon.member.web;
|
||||
|
||||
import com.itn.mjonApi.cmn.msg.RestResponse;
|
||||
import com.itn.mjonApi.mjon.member.service.MemberService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
public class MemberRestController {
|
||||
|
||||
@Autowired
|
||||
private MemberService memberService;
|
||||
|
||||
@GetMapping("/member/mymsg")
|
||||
public ResponseEntity<RestResponse> mymsg(){
|
||||
return ResponseEntity.ok(memberService.findAll());
|
||||
}
|
||||
|
||||
@GetMapping("/member/mymsg_2")
|
||||
public ResponseEntity<RestResponse> mymsg2(){
|
||||
return ResponseEntity.ok(memberService.findAll2());
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user