본문 바로가기

프로그래밍

Spring Advice 태그 1. POJO 기반 AOP 구현 - POJO 기반 Advice 클래스 작성 - 설정파일에 AOP 설정 + Advice class를 Bean으로 설정 + 태그를 이용해 Advice, Pointcut을 설정한다. 2. 시점에 따른 5가지 태그 - before : 대상 객체의 메소드가 실행되기 전에 실행됨 + return type : 상관없으나 void로 한다. + argument : 없거나 JoinPoint 객체를 받는다. - after-returning : 대상객체의 메소드 실행이 정상적으로 끝난 뒤 실행됨 + return type : 상관없으나 void로 한다. + argument : 없거나 JoinPoint 객체를 받는다. + returning ++ B.L에서 리턴받은 값을 매개변수로 받을 수 있다.... 더보기
InitializingBean 인터페이스 InitializingBean 인터페이스 빈 객체의 라이프 사이클과 관련된 인터페이스 중에서 가장 많이 사용되는 것 중의 하나가 org.springframework.beans.factory.InitializingBean 인터페이다. 객체를 생성하고 프로퍼티를 초기화 하고, 컨테이너관련 설정을 완료한 뒤에 호출되는 메서드를 정의하고 있다. public interface InitializingBean { public void afterPropertiesSet() throws Exception } afterPropertiesSet() 메서드는 주로 빈 객체의 프로퍼티가 모두 올바르게 설정되었는지의 여부를 검사하는 용도 (프로퍼티 값을 검증하는 코드를 구현) public abstract class Abstrac.. 더보기
jquery checkbox를 이용한 show/hide if($("input:checkbox[name=pollStatus]").is(":checked") == true){ alert("checked"); $(".poll").show(); }else{ alert("not checked"); $(".poll").hide(); } 더보기
mySql 한글, 영문 정렬 Mysql에서 한글, 영문, 숫자 정렬시.. 한글 ㄱ,ㄴ,ㄷ 한 다음 A,B,C 로 정렬이 되게 하는 방법.. select if(ASCII(SUBSTRING(name, 1)) < 128, 2, 1) cc, name from 테이블 order by cc, name 더보기
TIOBE Programming Community Index for June 2013 June Headline: JavaScript back in the top 10This month, JavaScript re-entered the top 10 of the TIOBE index. It is still a bit of a miracle why this ubiquitous language is not yet part of the top 5. JavaScript is the glue of client-side web page programming nowadays. But JavaScript is currently expanding its application domain. Node.js has made JavaScript a server-side programming language and t.. 더보기
아파치 가상호스트 설정하기 이 설명은 윈도우에서 APM_SETUP을 바탕으로 작성한 것이다. 두 파일을 건드려야 한다. 하나는 기본 설정 파일, 하나는 가상 호스트 설정 파일. 가상 호스트 설명을 보면 종종 어떤 파일을 건드려야 하는지 안 나와 있는데, 그게 문제인 듯하다. 다음 두 파일을 건드려야 한다. 메모장에서 열면 된다. txt파일이니까.{아파치 루트}/conf/httpd.conf 와 {아파치 루트}/conf/extra/httpd-vhosts.conf 다. (위에서 {아파치 루트}는 아파치가 설치돼 있는 폴더를 의미한다.) * httpd.conf에서 설정해야 하는 것. 1. Listen이라고 써 있는 부분을 찾는다. 이 부분은 포트를 설정하는 부분이다. 포트가 뭔지까지 설명하지는 않겠다. 아파치가 사용하는 기본 포트는 80.. 더보기
스프링에서 <constructor-arg>사용 생성자를 통해 빈을 주입받는 경우는 태그를 이용하여 처리 빈(객체)를 주입 (전달)받는 경우는 를 사용하며 기본 데이터 타입이나 String타입이라면 를 사용한다. 즉 ref대신 value를 사용 또한, value로 전달된 값은 기본적으로 String 타입으로 처리 하지만 태그에 type속성을 추가하면 직접 파라미터의 타입을 명시 할 수도 있다. 또는 TEST TEST TEST 타입 설정 20000 더보기
git 강제 pull git을 쓰다보면 git 서버와 충돌이 나고 서로간의 의사소통이 잘 안되서 파일이 충돌 날때가 있다. 이때 서버를 기준으로 다시 받으려면 오류가 발생할수 있는데 강제로 다시 받기 위해서 다음과 같은 명령을 내린다. git reset --hard HEAD git pull 더보기
PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 71 bytes) in ..... 해결 방법 1. php.ini 파일의 수정 php.ini 파일에서 memory_limit 값을 수정하면 도니다. 그러나, 이것보다 더 간단한 방법 2. 소스에 다음과 같은 내용 삽입 ini_set("memory_limit", -1); 더보기
이클립스에서 git pull 나는 오류중 The current branch is not configured for pull No value for key branch.master.merge found in configuration 해결법 To fix this problem in Eclipse, open the Windows menu and select Show View / Other / Git Repositories. From the Git Repositories tab:expand your local repositoryright click on Remoteclick on Create Remote...Remote name = originnext to IRI press the Change buttonCTRL+SPACE on URIselect the remote locationpress Finishpress Save and PushAgain, from the Git Repositories tab:right click on originsele.. 더보기