목록전체 글 (157)
알고보면코딩천재
확장 가능한 벡터 그래픽 (Scalable Vector Graphics) XML 기반의 2차원 그래픽. 아이콘, 이미지, 그래프, 사용자 인터페이스 등에 널리 쓰임. DOM의 일부로서 각 개체별로 HTML 엘리먼트가 추가됨. 벡터이기 때문에 이미지의 크기에 상관 없이 선명하게 유지되고 모양이 많이 복잡하지 않은 경우 파일 사이즈도 작다. CSS와 자바스크립트를 이용해서 조작이 가능(유지 보수 용이). 크기(width/height)가 큰 이미지 표현에 유리. 모양이 복잡하고 개체수가 많을수록 성능이 떨어짐. (로고처럼 간단한 것으로 사용하는 것이 좋다( 비교: 캔버스(Canvas) 비트맵 기반 그래픽. 이미지나 비디오의 픽셀 조작, 게임, 퍼포먼스가 중요한 이미지 조작 등에 쓰임. 단일 태그 로 표현. 자..
{ max-width:; height:0; position: relative; padding-bottom: calc(세로/가로*100%); background-image: url('이미지경로'); background-size: 100vw; background-repeat: no-repeat; background-position: center top; } css .container { height: 100vh; width: 100vw; } .img_item { width: 100%; height: 100%; margin: 0 auto; background-image: url("이미지URL"); background-repeat: no-repeat; background-position: center cente..
@Param이란? -Mybatis의 SQL 문장에 (데이터베이스에) 다수의 변수를 전달할 때는 전달되는 변수들에 @Param 어노테이션을 붙여주어 각 변수를 구분할 수 있다록 한다. 변수를 한개만 전달할때는 상관없지만, 다수의 변수를 전달할때는 꼭 @Param을 써준다. 안써봤는데 오류나더라. Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Thu Sep 08 14:58:51 KST 2022 There was an unexpected error (type=Internal Server Error, status=500). nested exception is..
검색바 ui main.jsp Search 번호 게시글제목 작성자이름 ${boards.id } ${boards.title } ${boards.username } Prev ${num} Next get은 데이터를 body에 못담으니까 주소에 담아간다 쿼리스트링-PK아니니까 당연하죠? ?page=0&keyword=스프링 boards.xml 쿼리문 작성 검색기능을 1. 동적 쿼리로 작성한다. 2. 쿼리문 하나 더 만든다 SELECT totalCount, totalPage, currentPage, decode(currentPage, 0, 1, 0) first, decode(currentPage, totalPage-1, 1, 0) last FROM ( select count(*) totalCount, ceil(cou..
회원정보수정 둘 다 postmapping -header.jsp (링크) -users/updateForm.jsp (1)세션가져오기 (2)변경 (3)수정 (4)세션동기화 password, email 수정 updateDto만들기 (import 주의) 회원탈퇴 postmappin /users/{id}/delete 탈퇴하고나면 로그아웃 되어야 함 (1) 삭제 (2) 세션 무효화(session invalidated) (3) 글 같이 삭제 혹은 FK 삭제 @GetMapping 은 select할때만 써라 delete할때 쓰면 안되는 이유 뭘까? 하이퍼링크로 뚫을 수 있다 ! -> 꿀잼ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ!! 근데 어차피 GetMapping 안쓰니까 이제 못뚫음. 낄낄..ㅎㅎ 공격 시나리오 정리할 것 XSS --..
stateful한척 하는게 session response bw선만 유지한다 일방적으로 push가능 updateForm.jsp 만들기 (wirteForm과 같다) 원래는 put요청이라 form으로 못한다. 지금은 자스를 안배워서 일단 post로 배우는 것 글쓰기는 CV패턴 업데이트는 MVC패턴 ${boards.content } 수정완료 model에 담아서 title, content들고 와야한다. required, maxlength restful api 자원에 접근하는 주소를 설계하는 방식-프로토콜이라서 무조건 따라할 필요가 없다. (프로젝트할때 공부해볼것) 말이되게(잘 읽히게) 설계하면 된다. BoardsController @GetMapping("/boards/{id}/updateForm") public ..
delete 쿼리문 짜기 SELECT totalCount, totalPage, currentPage, decode(currentPage, 0, 1, 0) first, decode(currentPage, totalPage-1, 1, 0) last FROM ( select count(*) totalCount, ceil(count(*)/3) totalPage, #{page} currentPage, 0 first, 0 last FROM boards ) INSERT INTO boards(id, title, content, usersId, createdAt) VALUES(boards_seq.nextval, #{title}, #{content}, #{usersId}, sysdate) SELECT id, title, ..