본문 바로가기

전체 글

(330)
SpringBoot 설치 Spring Tools 4 for Eclipse (sts사이트에서 설치) boot bersion 3점대 버전은 java17이상만 사용가능 SNAPSHOT : 개발중 # EclipseMarketplace : eclipse web Developer tools 설치 -> web 설정 UTF-8로 바꾸기 # springBoot에서는 기본적으로 jsp파일 지원x jsp 해석하는 jasper lib 필요함. https://start.spring.io/ 프로젝트를 만들어주는 사이트 *** sec 프로젝트 참고하기 mybtis lib 추가 시 database 설정 정보 없으면 실행 안됨. aplication.properties에 아래 내용 작성 \# server.port 설정 server.port=8081 \# dat..
UI개선사항 0. https://www.airbnb.co.kr/account-settings 처럼 account 페이지 바꾸기 - 완료 로그인/회원 가입 - 에어비앤비 여행자와 현지 호스트가 함께하는 에어비앤비 전 세계 커뮤니티의 일원이 되어보세요. 이메일 주소나 페이스북/구글 계정으로 로그인하세요. www.airbnb.co.kr 1. 달력 a링크 고치기.(디테일 파티) - 완료 2. 달력 날짜 안옮겨지게 막기 - 완료 3. 지도 이미지에 따라 크기가 다르다. FIX하기 - 완료 4. 지도 글자 길면 칸에서 나가짐. - 완료 5. 파티게시판에 번호 대신 '공지'라고 표시 - 완료 6. 파티게시판에 규제된 게시물입니다. 표시 - 완료
채팅구현 - 웹소켓통신 참고 : mvc_security_template pom.xml org.springframework spring-websocket ${org.springframework-version} root-context.xml에 등록 (이때 path가 SockJS 객체 생성시에 들어가는 url 요청 경로임) 1.ChatHandler 클래스 생성. public class ChatHandler extends TextWebSocketHandler { 메소드 : handleTextMessage : client에서 메세지 받으면 실행되는 메소드. .sendMessage : 클라이언트로 메세지를 보내는 메소드 2. 실제 자바스크립트로 jsp페이지에서 사용.(chat.jsp) ``` ``` SockJS 객체 - SockJS 생성..
spring security & DB 연계 참고 : mvc_security_template join.jsp에서 multipart/form-data라서 multipartResolver가 변환해줌 filter-resolver-servlet순서인데 security filter가 먼저 확인해서 token 없구나 라고 인식해버린다. -> filter 추가 등록 필요 springMultipartFilter org.springframework.web.multipart.support.MultipartFilter springMultipartFilter /* filterMultipartResolver 라고 root-context.xml에서 resolver 이름 변경(이름은 고정임) org.springframework.security spring-security-t..
친구 리스트 UI 구현 및 인터셉터 적용 1. 친구 목록의 친구를 클릭하면 친구의 파티 상태를 볼 수 있게 한다. 느낀점 : 부트스트랩 기반으로 카드 디자인을 하나를 잘 만들어 놓고 모듈화시켰다. 필요한 곳에 그대로 활용할 수 있으니 좋다. 아래는 AJAX의 콜백함수에 들어갈 부분이다. str +=""; str += ""; str += ""; str += ""; str += ""; str += ""; str += ""; str += ""+this.pname+""; str += ""+this.sido+""; str += ""+startDate+"~"+endDate+""; str += ""; str += ""; str += ""; str +=""; $("#previousView").append(str); 2. 친구신청을 보낸 후 보낸목록 버튼 클릭..
AWS RDS too many connections 이슈 해결 RDS의 파라미터 그룹에서 max_connections와 wait_timeout 값을 조정한다. spring boot 프로젝트 당 default connection 값이 10이다. RDS에 프로젝트 3개만 붙여도 커넥션이 터지는 경우가 발생하는 것이기 때문에, max_connections를 조정할 필요가 있다. 다음은 wait_timeout을 조정한다. wait_timeout은클라이언트가 실제로 이용하지 않더라도 8시간 동안 DB는 계속 커넥션을 붙잡고 있다. 변경 했으면 반드시 RDS를 재부팅해줘야 한다. 운영 중인 DB의 경우 새벽시간을 활용하거나, 따로 보조 데이터베이스를 두고 재부팅하는 것을 권장한다.
SPRING SECURITY 보안프레임워크 MAVEN 라이브러리 추가 pom.xml 11 5.3.29 5.8.6 1.9.19 2.0.7 org.springframework.security spring-security-core ${security-version} org.springframework.security spring-security-web ${security-version} org.springframework.security spring-security-config ${security-version} core,web,config 다 있어야 함. web.xml springSecurityFilterChain org.springframework.web.filter.DelegatingFilterProxy springSecurityFilterCha..
이메일 검증하는 법 : SMTP 활용 SMTP(Simple Mail Transfer Protocol) 인터넷에서 이메일을 전송하기 위한 프로토콜 메일 서버간 송수신 또는 클라이언트에서 메일 서버로 보낼 때 사용. 보안계층 방식 2가지 1)SSL == 465 2)TLS == 587 (SSL에서 보안 더 강화) com.sun.mail javax.mail 1.6.2 org.springframework spring-context-support ${org.springframework-version} pom.xml에 추가 (support 추가해주면 bean으로 등록해서 편하게 사용 가능) root-context.xml에 아래와 같이 작성. smtp true true