시스템 종료와 재부팅 - shutdwon 명령어shutdown [옵션] [시간] [메세지] shutdwon -h 1010분후에 시스템을 종료shutdwon -r now바로 시스템 재부팅shutdown -c시스템종료 예약 취소 명령 - init 명령어리눅스 시스템이 가동되는 방법에는 0~6까지 7개가 있다. 이를 런레벨(Run Level)이라고 한다.0 - 종료모드1 - 단일 사용자 모드(시스템 복구시 사용)2 - 다중 사용자 텍스트 모드(NFS 사용불가)3 - 다중 사용자 텍스트 모드4 - 사용안함5 - 다중 사용자 그래픽 모드6 - 재부팅 모드 init 0 시스템을 종료한다.init 6 시스템을 재부팅 한다.init 3 다중사용자 텍스트 모드로 전환한다. 현재 사용되고 있는 init모드를 설정하거나 확..
익명클래스는 인스턴스 생성시 이름이 없는 클래스이다. 익명 클래스는 클래스, 인터페이스가 그 대상이 된다. 클래스의 선언과 인스턴스 생성을 동시에 하기 때문에 한번만 사용되며, 하나의 객체만을 생성한다는 특징이 있다. 익명클래스 형태 new 조상클래스이름{} new 인터페이스이름{} 이름이 없기 때문에 생성자도 가질 수 없다. 일반적인 클래스와는 달리 상속과 구현을 동시에 할 수 없으며 오로지 하나의 인터페이스를 구현하거나 하나의 클래스를 상속 받을 수 있다.System.out.println(new Layout(){ void test(){ System.out.println(i); } void tests(){ System.out.println(222); } }); 위의 결과는 패키지명,메인클래스이름$1@1..
jsp 개발환경 구축 ○ java 설치 및 설정 - java se jdk 다운로드(본인은 1.8 버전받음)http://www.oracle.com/technetwork/java/javase/downloads - FTP를 열어서 다운받은 jdk파일 올린다. - java jdk1.8.~ 압축파일 해제 (tar -xvf 파일명) - mv 명령어로 압축을 해제한 jdk1.8.~디렉토리를 /usr/local/ 경로로 이동시킨다. - jdk 경로설정을 쉽게 알아보기 위해 jdk1.8.~디렉토리의 심볼릭링크를 java이름으로 변경> ln -s /usr/local/jdk.1.8~ java - 콘솔에서 자바를 컴파일, 실행하기 위해 환경변수를 설정한다.1. 수정을 위해 profile파일을 연다(vi 모드)> vi /etc..
1. 구글 리캡차 api key 발급https://www.google.com/recaptcha/admin#list label : 이름domain : URL입력 (로컬이라면 localhost 입력) owner : 소유자 이메일 발급받은 후 sitekey, secretkey 복사 2. 메이븐 의존성 주입net.tanesha.recaptcha4jrecaptcha4j0.0.7 3. jsp 엘리먼트 작성 siteKey는 발급받은 것 적으면 됨 4. 자바스크립트 메서드 작성(본인은 ajax 처리) $.ajax({ url : '/member/captchaAjax', type : 'post', data : { recaptcha : document.getElementById("g-recaptcha-response").v..
열거형은 사용자 정의 타입이다. 기본형 중에서도 숫자와 관련된 타입(int, long, double, short 등등)을 상속받아 정의할 수 있다. 기본형식은[접근제한자] enum enum명{ 식별자1, 식별자2, 식별자3 .......}처럼 사용 enum Today : byte { Monday, Tuesday, Wednesday } enum Olympians { Zeus, Hera, Poseidon = 10, Athena, Ares = 20, Aphrodite } 다음은 enum을 정의한 것으로Today와 Olympians이다. Today처럼 상속을 받으면 해당 기본형타입을 토대로 사용하며, 상속받는 타입이 없을 경우(Olympians경우)에는 기본적으로 int(System.Int32)를 상속받는다. ..