분류 전체보기
-
datatables 를 사용하면서 각 컬럼마다 검색 기능이 필요하여 구현하게 되었다. // html = 0){ $(cell).html(''); } $('input',$('.filters th').eq($(api.column(colIdx).header()).index())) .off('keyup change') .on('change', function(e){ $(this).attr('title', $(this).val()); var cursorPosition = this.selectionStart; api.column(colIdx).search(this.value != '' ? this.value : '').draw(); }) .on('keyup', function(e){ e.stopPropagation(..
DataTables columns search 기능 구현datatables 를 사용하면서 각 컬럼마다 검색 기능이 필요하여 구현하게 되었다. // html = 0){ $(cell).html(''); } $('input',$('.filters th').eq($(api.column(colIdx).header()).index())) .off('keyup change') .on('change', function(e){ $(this).attr('title', $(this).val()); var cursorPosition = this.selectionStart; api.column(colIdx).search(this.value != '' ? this.value : '').draw(); }) .on('keyup', function(e){ e.stopPropagation(..
2024.03.20 -
e.preventDefault() 와 e.stopPropagation() 는 이벤트 관련 동작에서 많이 사용되는 코드이다. e.preventDefault() e.preventDefault() 는 a 태그나 submit 처럼 페이지를 이동시키거나 form 태그의 submit 하는 동작을 중지시킨다. // javascript $("a").click(function(e){ e.preventDefault(); alert('prevnetDefault 로 인해 이벤트 중지'); }); // html 네이버 페이지 이동 위처럼 "네이버 페이지 이동" 이라는 a 태그의 링크를 클릭하면 click 이벤트 함수가 발생하고 e.preventDefault() 로 인해 이벤트가 중지된다. e.stopPropagation() e..
e.preventDefault() 와 e.stopPropagation() 의 차이e.preventDefault() 와 e.stopPropagation() 는 이벤트 관련 동작에서 많이 사용되는 코드이다. e.preventDefault() e.preventDefault() 는 a 태그나 submit 처럼 페이지를 이동시키거나 form 태그의 submit 하는 동작을 중지시킨다. // javascript $("a").click(function(e){ e.preventDefault(); alert('prevnetDefault 로 인해 이벤트 중지'); }); // html 네이버 페이지 이동 위처럼 "네이버 페이지 이동" 이라는 a 태그의 링크를 클릭하면 click 이벤트 함수가 발생하고 e.preventDefault() 로 인해 이벤트가 중지된다. e.stopPropagation() e..
2024.03.20 -
Spring Security 5 버전에서 6 버전으로 바뀌면서 변경된 내용중 SecurityContextHolder 에 관한 내용이 있어 공부하게 되었다. SecurityContext 사용자 인증 정보를 저장하고 있는 Authentication 객체를 저장하는 보관소이다. SecurityContextHolder 전략(Strategy)에 따라 SecurityContext 에 저장하는 방식이 다르며 일반적으로 ThreadLocal 에 저장한다. Authentication 인증 객체를 한 쓰레드에서 공유하므로 언제든지 불러와 사용할 수 있다. SecurityContextHolder SecurityContext 를 관리하고 저장하는 객체이다. SecurityContext 저장을 위해 ThreadLocal 를 가..
SecurityContext, SecurityContextHolderSpring Security 5 버전에서 6 버전으로 바뀌면서 변경된 내용중 SecurityContextHolder 에 관한 내용이 있어 공부하게 되었다. SecurityContext 사용자 인증 정보를 저장하고 있는 Authentication 객체를 저장하는 보관소이다. SecurityContextHolder 전략(Strategy)에 따라 SecurityContext 에 저장하는 방식이 다르며 일반적으로 ThreadLocal 에 저장한다. Authentication 인증 객체를 한 쓰레드에서 공유하므로 언제든지 불러와 사용할 수 있다. SecurityContextHolder SecurityContext 를 관리하고 저장하는 객체이다. SecurityContext 저장을 위해 ThreadLocal 를 가..
2024.02.23 -
Spring Security 5 버전에서 6버전으로 올라가면서 Success Handler 까지 정상적으로 인증이 성공했지만 로그인이 안되어 찾아보다가 공식 문서 및 구글링을 통해 찾았다. 위 내용을 요약하면 아래와 같다. Spring Security 5 에서는 SecurityContextPersistenceFilter 를 사용하여 Security Context 가 SecurityContextRepository 에 자동으로 저장된다고 한다. 정상적인 요청과 응답이 수행되기 전에 세션을 생성한다는 문제점과 이러한 세션을 추적하기가 어렵다는 문제가 있었다. Spring Security 6 에서는 SecurityContextPersistenceFilter 가 Defrecated 되고 SecurityContex..
Spring Security 5 버전에서 Spring Security 6 버전으로 올라가면서 변경된 SecurityContext 에 인증 객체 설정Spring Security 5 버전에서 6버전으로 올라가면서 Success Handler 까지 정상적으로 인증이 성공했지만 로그인이 안되어 찾아보다가 공식 문서 및 구글링을 통해 찾았다. 위 내용을 요약하면 아래와 같다. Spring Security 5 에서는 SecurityContextPersistenceFilter 를 사용하여 Security Context 가 SecurityContextRepository 에 자동으로 저장된다고 한다. 정상적인 요청과 응답이 수행되기 전에 세션을 생성한다는 문제점과 이러한 세션을 추적하기가 어렵다는 문제가 있었다. Spring Security 6 에서는 SecurityContextPersistenceFilter 가 Defrecated 되고 SecurityContex..
2024.02.22 -
자바 데이터 타입 Java 의 데이터 타입은 크게 두가지로 기본 타입과 참조 타입으로 분류된다. 기본 타입(Primitive Type) : byte, int, short, char, long, float, double, boolean 참조 타입(Reference Type) : 배열 타입, 문자열, 열거 타입, 클래스, 인터페이스 기본 타입(Primitive Type) 기본 타입으로 선언된 변수들은 실제 값이 변수에 저장된다. 기본 타입의 종류로는 byte, int, short, char, long, float, double, boolean 등이 있다. int obo = 20; char obo2 = "a"; 참조 타입(Reference Type) 참조 타입으로 선언된 변수들은 메모리의 주소를 값으로 갖는다..
Java 데이터 타입(기본 타입, 참조 타입)자바 데이터 타입 Java 의 데이터 타입은 크게 두가지로 기본 타입과 참조 타입으로 분류된다. 기본 타입(Primitive Type) : byte, int, short, char, long, float, double, boolean 참조 타입(Reference Type) : 배열 타입, 문자열, 열거 타입, 클래스, 인터페이스 기본 타입(Primitive Type) 기본 타입으로 선언된 변수들은 실제 값이 변수에 저장된다. 기본 타입의 종류로는 byte, int, short, char, long, float, double, boolean 등이 있다. int obo = 20; char obo2 = "a"; 참조 타입(Reference Type) 참조 타입으로 선언된 변수들은 메모리의 주소를 값으로 갖는다..
2024.02.14 -
HttpServletResponse 의 sendRedirect 메서드 Java Servlet 에서 페이지 이동을 위해 redirect 하는 메서드이다. Http 프로토콜을 사용하여 정해진 규칙으로 서버가 클라이언트에게 특정 URL 로 이동하라고 요청을 보낸다. sendRedirect 메서드를 사용하게 되면 서버에서는 클라이언트에게 응답 상태값을 302 와 함께 이동할 URL 정보를 Location 헤더값에 담아 전송한다. 클라이언트 브라우저는 서버로부터 받은 상태값이 302 일 경우 Location 헤더 값으로 재요청을 보내어 Redirect 하게 된다. 예시) 개발환경 : Spring Boot, JSP 위처럼 jsp 페이지가 2개가 존재한다. test.jsp asdfsadfasdfasd response..
HttpServletResponse 의 sendRedirect() 와 RequestDispatcher 의 forward() 메서드 차이HttpServletResponse 의 sendRedirect 메서드 Java Servlet 에서 페이지 이동을 위해 redirect 하는 메서드이다. Http 프로토콜을 사용하여 정해진 규칙으로 서버가 클라이언트에게 특정 URL 로 이동하라고 요청을 보낸다. sendRedirect 메서드를 사용하게 되면 서버에서는 클라이언트에게 응답 상태값을 302 와 함께 이동할 URL 정보를 Location 헤더값에 담아 전송한다. 클라이언트 브라우저는 서버로부터 받은 상태값이 302 일 경우 Location 헤더 값으로 재요청을 보내어 Redirect 하게 된다. 예시) 개발환경 : Spring Boot, JSP 위처럼 jsp 페이지가 2개가 존재한다. test.jsp asdfsadfasdfasd response..
2024.02.13