비전공코딩(2)
-
myBatis2
controller => list 주소 처리 return void로 설정 service.list()함수 이용 전체 데이터 select 전체 데이터 sysout확인 후 model에 저장 list.jsp로 응답위임 list.jsp => el태그 이용 전체 테이터 출력 main.jsp 수정 추가 => db insert 후 list 다시 띄우기 (51번 사원추가 테스트 ) 2.삭제 => 51번 삭제 후 list다시 띄우기 (? 이용) 3.삭제=>51번 삭제 후 list다시 띄우기 (pathvariable이용) 3.수정 => 51번 사원정보 수정 후 list 다시 띄우기 list2 주소 처리 => ModelAndView => list2.jsp list3 주소처리 => forward => list3.jsp add/..
2024.02.16 -
@Reponsebody ,mybatis
@Reponsebody @RequestBody : 프론트 json ⇒ 서버에 Request Body 전송시 서버에서 수신할 경우 사용 @ResponseBody 버튼⇒ 특정 주소 /aaa 요청 @RequestMapping(/aaa) @ResponseBody public String aaa(){returs “test”; //문자열 전체를 응답 데이터로 처리 } @ResponseBody public String aaa(){ return “hello”; // 문자열 전체를 응답데이터로 처리 ‘hello’문자열 응답처리 } public String aaa(){ return “hello”; // hello.jsp } @Controller public class TestController { @RequestMappi..
2024.02.16