Spring7 mybatis 안에서 mariaDB문법 1 2 3 4 5 update notice set ndel = if(ndel=1,0,1) where nno=#{nno} Colored by Color Scripter cs ndel = 1이면 ndel = 0 ndel = 1이 아니면 ndel = 1 → 즉, ndel = 0이면 ndel = 1 1 2 3 4 5 6 7 8 update notice set ndel = 1 0 where nno=#{nno} Colored by Color Scripter cs 이렇게 mybatis 문법으로 쓰려면 jsp파일에서 ndel을 @controller로 보내고 그 값을 받아서 mapper에 보내줘야 한다. 2023. 8. 23. java.lang.NumberFormatException: For input string: "nno" String을 숫자 타입으로 형변환할 때 자료형 불일치 경우에 나타나는 오류 @controller 1 2 3 4 5 6 7 8 @GetMapping("/notice") public String notice(Model model) { List list = noticeService.list(); model.addAttribute("list", list); System.out.println(list); // [{ndate=2023-08-18 11:21:10.0, m_no=5, ntitle=공지, ncontent=공지 내용, nno=1, ndel=1}] return "notice"; } Colored by Color Scripter cs notice.jsp 1 2 3 4 5 ${list.nno } ${list... 2023. 8. 18. java.lang.IllegalStateException: Ambiguous mapping 다른 controller에 이미 메서드가 있기 때문에 mapping할 수 없다. 2023. 8. 18. 압축파일로 스프링 프로젝트 불러오기 Import → Existing Projects into Workspace → Select archive file에서 파일 고르기 2023. 8. 17. 이전 1 2 다음