@Autowired private static SqlSession sqlSession이것이 static으로 할 경우 sqlSession이 Null이 될 수 있다.해결방법은 이렇다. private static SqlSession sqlSession; @Autowiredprivate void setSqlSession(SqlSession sqlSession){ this.sqlSession = sqlSession; } static 변수로 선언만 해주고, set메써드를 만들어 @Autowired를 걸어 준다.
[월:] 2019 10월
브라우저 버전 체크
function isBrowserCheck(){ var agt = navigator.userAgent.toLowerCase(); if (agt.indexOf("chrome") != -1) return 'Chrome'; if (agt.indexOf("opera") != -1) return 'Opera'; if (agt.indexOf("staroffice") != -1) return 'Star Office'; if (agt.indexOf("webtv") != -1) return 'WebTV'; if (agt.indexOf("beonex") != -1) return 'Beonex'; if (agt.indexOf("chimera") != -1) return 'Chimera'; if (agt.indexOf("netpositive") != -1) return 'NetPositive'; if (agt.indexOf("phoenix") != -1) return 'Phoenix'; … 계속 읽기 브라우저 버전 체크
다른 Window(팝업, 부모) POST 전송
자식창에서 부모창으로 POST 전송 <!--자식창에서만 작성--> parent.window.name="parentWindow"; document.form1.submit(); <form name="form1" method="post" action="test.html" target="parentWindow"></form> 팝업창으로 POST 전송 <script> function openwin() { window.open('about:blank','popwin','width=400,height=300'); document.f1.submit(); } </script> <form name="f1" action="popwin.jsp" target="popwin"> <input type="text" name="v1"> <input type="button" value="send" onClick="openwin()"> </form>
자판 입력시 (000-0000-0000)로 자동 치환 : 전화번호, 사업자번호
//전화번호 $("#phone").on("keyup", function(event){ var keyCode = event.which || event.keyCode; if ( ( (keyCode >= 48) || (keyCode <= 57) ) || ( (keyCode >= 96) || (keyCode <= 105) ) ){ var tmp = $(this).val().replace(/[^0-9]/g,''); if(tmp.length<=3){ $(this).val(v.replace(/([0-9]{2})([0-9]+)/,'$1-$2')); }else if(tmp.length<=6){ $(this).val(v.replace(/([0-9]{2})([0-9]{3})([0-9]+)/,'$1-$2-$3')); }else if(tmp.length>9){ $(this).val(v.replace(/([0-9]{3})([0-9]{4})([0-9]+)/,'$1-$2-$3')); } } else { event.returnValue = false; } }); //사업자번호 $("#businessnumber").on("keyup", function(event){ … 계속 읽기 자판 입력시 (000-0000-0000)로 자동 치환 : 전화번호, 사업자번호
사업자번호 000-00-00000 자동생성 및 커서 중간 수정해도 커서 뒤로 안가는 로직
//커서위치 가져오기 $.fn.getCursorPosition = function() { var input = this.get(0); if (!input) return; // No (input) element found if ('selectionStart' in input) { // Standard-compliant browsers return input.selectionStart; } else if (document.selection) { // IE input.focus(); var sel = document.selection.createRange(); var selLen = document.selection.createRange().text.length; sel.moveStart('character', -input.value.length); return sel.text.length - selLen; } } //커서위치 변경시키기 $.fn.selectRange … 계속 읽기 사업자번호 000-00-00000 자동생성 및 커서 중간 수정해도 커서 뒤로 안가는 로직
Window에서 curl 명령어 사용하기
참고 : https://m.blog.naver.com/javaking75/220776461230 curl 사이트에서 window 비트에 맞추어 zip 파일을 다운로드 받는다. https://curl.haxx.se/download.html curl-7.64.1.zip 사용방법 : 아래위치로 압축푼 파일 이동 C:\curl-7.64.1-win64-mingw시스템 환경 변수에서 path 편집으로 들어가서 아래 내용 추가 C:\curl-7.64.1-win64-mingw\bin;사용예시 Command 창 띄움 Window+R > cmd명령어 예시 curl http://test.aaboo.com/batch/merchantEmailAttachMaker?recvdate=20190415
Apache2.2 공사중 화면으로 접속되게 하는 방법
시스템 점검이 발생하여, 웹서비스를 막고자 할 때 모든 접속을 공사중 화면으로 보여주게 할 경우에는 아파치가 설치된 경로에 있는 아래 파일에서 내용을 추가하면 된다. httpd/conf/httpd.confhttpd/conf/extra/httpd-vhosts.conf 1 conf/httpd.conf 에서는 LoadModule rewrite_module modules/mod_rewrite.so 를 찾아서 주석을 제거해 준다. 2) httpd.conf 또는 httpd-vhosts.conf에서 아래 내용을 추가한다 include conf/extra/httpd-vhost.conf 가 httpd.conf에 연결설정이 되어 있으면 httpd-vhost.conf 에서 추가하고 아닌 경우엔 httpd.conf에서 … 계속 읽기 Apache2.2 공사중 화면으로 접속되게 하는 방법
Window7 컴퓨터 부팅속도 개선 : msconfig > 시작프로그램
실행 > msconfig > 시스템구성 : 시작프로그램 여기에서 불필요한 프로그램을 선택해제 하고 적용하면 된다.
Golden 에서 쿼리 PLAN 상세히 보기
Golden에서 쿼리를 작성하고 Ctrl+P 를 통해 간략한 플랜을 볼 수 있지만, 아래처럼 코드 몇 줄 추가하여 F5를 눌러 상세한 정보를 볼 수 있었다. EXPALIN PLAN FOR SELECT * FROM TEST1 A, TEST2 B WHERE A.DATA = B.DATA ; SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY()); F5(Run Script 실행) 내용을 복사해서 울트라에디터와 같은 편집기에 붙여넣기해서 보면 아래처럼 나온다. 하단에서 … 계속 읽기 Golden 에서 쿼리 PLAN 상세히 보기
INSERT와 UPDATE를 동시에 MERGE INTO
아래처럼 합니다. 대충 감이 오실라나 모르겠네요 merge into returncode a --입력할 테이블 using aaboo_tmp01 b --소스테이블(사용할 테이블이 없으면 Default로 DUAL 사용) on ( --조건문 a.bank='KMC' and a.returncode = b.col1 ) when matched then --입력할 테이블에 해당데이터가 있으면 update set --업데이트하고 a.returnname = b.col3 when not matched then --입력할 테이블에 해당데이터가 없으면 insert (bank, returncode, returnname) … 계속 읽기 INSERT와 UPDATE를 동시에 MERGE INTO