개발 86

Illegal overloaded getter method with ambiguous type for property 'password' 에러 원인 및 해결방안

어느날 개발중에 다소 생소한 에러를 하나 마주쳤습니다. 위와 같은 에러였는데요 org.apache.ibatis.reflection.ReflectionException: Illegal overloaded getter method with ambiguous type for property 'password' in class '클래스명'. This breaks the JavaBeans specification and can cause unpredictable results. 대충 이런 내용의 에러였는데요 검색을 해보니 비슷한 오류를 겪으신 분들이 생각보다 많았습니다. 대략적으로 설명을 하자면 lombok 을 사용해서 모델객체를 만들 때 저의 경우 패스워드를 사용할지 여부를 저장하는 boolean 타입의 isP..

자바스크립트 div 혹은 제이쿼리 node 에 변화 감지해서 이벤트 발생시키기

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 // Mutation Observer => DOM 에 변화가 있을 때 감지해서 이벤트를 발생시켜주는 기능 //var target = document.getElementById('target'); var target = $('#target')[0]; // 감시자 인스턴스 만들기 var observer = new MutationObserver((mutations) => { // 노드가 변경 됐을 때의 작업 console.log("event 발생!"); }) // 감시자 옵션 포함, 대상 노드에 전달 var config = { attributes: true, childList: true, characterDa..

자바스크립트 한번만 실행되는 함수 만들기

1234567891011121314151617181920function once(fn, context) { var result; return function() { if(fn) { result = fn.apply(context || this, arguments); fn = null; } return result; };} // Usagevar canOnlyFireOnce = once(function() { console.log('Fired!');}); canOnlyFireOnce(); // "Fired!"canOnlyFireOnce(); // nadacs https://davidwalsh.name/javascript-once JavaScript Once Function Learn how to ensure ..

오라클 시퀀스를 사용하지 않고 자동 증가하는 id 값 만들기

오라클의 자동증가 컬럼 설정을 찾아보면 대부분 시퀀스를 설정하여 INSERT 시 해당 컬럼에 sequence.NEXTVAL 을 이용하여 자동 증가시키는 예제가 대부분이었습니다. 그래서 시퀀스를 사용하지 않고 값을 자동증가 시킬 방법이 없을지 찾아보다가 다음과 같은 글을 발견했습니다. https://stackoverflow.com/questions/11296361/how-to-create-id-with-auto-increment-on-oracle How to create id with AUTO_INCREMENT on Oracle? It appears that there is no concept of AUTO_INCREMENT in Oracle, up until and including version 11g..

개발/SQL 2021.06.23

자바스크립트 object key 값 동적으로 할당하기

작업을 하다가 어느 순간 어떤 배열을 이용하여 Object 를 생성해야 하는데 배열을 이용하여 동적으로 key 와 value 를 생성해야할 때가 있었습니다. Object 를 생성할 때는 1 2 3 4 5 6 7 var testObject = { "1번째 컬럼" : "사과", "2번째 컬럼" : "바나나", "3번째 컬럼" : "오렌지", "4번째 컬럼" : "포도", "5번째 컬럼" : "옥수수" } cs 이렇게 생성하는 방법밖에 몰랐었는데 blog.knowgari.com/JSON%EB%8F%99%EC%A0%81%ED%95%A0%EB%8B%B9/ [JavaScript] JSON 객체 Key값 동적 할당 JSON 객체 Key값 동적 할당 blog.knowgari.com 이분의 블로그를 참조하여 어떠한 배열..

Datepicker 사용시 TypeError: Cannot set property 'currentDay' of undefined

Jquery Datepicker 사용시 위와 같은 오류가 날 때가 있었습니다. 한참을 찾아봐도 해결이 되지 않다가 너무 사소한 실수인걸 알고나서 허무했네요 해결방법은 다른 tag 의 id 값 중 Datepicker 를 사용한 input 의 id 와 중복되는 것이 있는지 확인해보시면 됩니다.ㅎㅎ stackoverflow.com/questions/17781425/datepicker-returning-uncaught-typeerror-undefined-currentday Datepicker returning uncaught typeError: undefined 'currentDay' I've been using jQuery UI with Bootstrap and I seem to run into a probl..

Failed to execute 'appendChild' on 'Node' 에러 해결

document.getElementById('adminA').appendChild("(current)"); 위의 코드를 실행하면 아래와 같은 에러가 발생합니다. Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'. 대충 해석해보면 appendChild 는 Node 만 추가할 수 있다. 이런 얘기입니다. 따라서 위의 코드는 잘못된 코드이고 appendChild 를 사용하려면 var onSpan=document.createElement('span') onSpan.innerHTML="(current)" onSpan.classList.add('sr-only') document.getEleme..

자바스크립트 제이쿼리 $(window).focus() 가 안될 때

setTimeout( function(){ $(window).focus(); }, 50 ); 이런식으로 setTimeout 안에 포커스를 두면 잘 동작 합니다. 크롬에서만 일어나는 버그라고 하네요 stackoverrun.com/ko/q/10593877 javascript - $ (창) .focus()가 Chrome에서 제대로 실행되지 않았습니다. 내 페이지의 애드 센스 요소에 대한 클릭 수를 추적하고 싶습니다. 이를 달성하기 위해 창 개체에 포커스를두고 포커스가 사라지면 마우스가 애드 센스 iFrame 영역에 있는지 확인합니다. 그런 다 stackoverrun.com