APP을 만들기 위해서는1. 안드로이드 스튜디오 개발환경2. 안드로이드 sdk필요 xml로 레이아웃을 만들고, 자바 코드를 작성하고, 매니페스트파일을 수정하는 등의 과정 수행하고, 프로젝트의 소스파일이 자바 컴파일러에 의해 class파일이 만들어 진다 컴파일된 class파일은 개발도구 중 하나인 dx를 이용해 dex파일로 만들어지고 리소스 파일은 필요한 경우에 바이너리 파일로 빌드된다. 이 dex파일과 리소스파일은 aapt라는 개발도구에 의해 설치가 가능한 apk파일이 만들어진다. 개발단계에서는 인증을 위한 서명이 필요치 않은 unsigned상태이며, 플레이스토어에 올릴 때는 jarsigner를 이용해 signed상태로 만들어야 한다. 다른 사람이 만든 프로젝트를 안드로이드 스튜디오에서 열어보면 소스파일..
@InitBinder 스프링프레임워크에서의 바인딩이란 모델 클래스(오브젝트)의 프로퍼티(메서드 set)에 값을 넣는 것을 말한다. 두가지 바인딩을 제공하는데.. 첫 번째는 xml설정 파일을 통해 의 에 값을 넣는 것이다. 하지만 xml자체가 문자열이기 때문에 해당 빈클래스의 property값이 기본형 타입이나 String이라면 괜찮지만 그 외의 타입이라면 바인딩 하기전에 적절한 변환이 필요하다. 두번째는 Http를 통해 전달되는 헤더, 쿠키, 파라미터 같은 정보인데 이런 것들도 전부 문자열로 전달되는 값이다. 해서 이 경우에도 특정 타입으로 매칭시키려면 바인딩 과정 중에 적절한 변환이 필요하다. 컨트롤러 메서드에서는 @RequestParam, @PathVariable, @ModelAttribute등이 메..
JUnit은 자바에서 제공하는 표준 테스트 도구이다. 스프링도 JUnit을 발판으로 테스트를 하면서 만들어졌다고 한다. JUnit을 실행하는 방법 대부분의 자바 개발자가 사용하는 이클립스는 JUnit테스트를 지원하는 기능을 제공하고 있다.@Test가 들어있는 클래스를 선택 - Run - Run as - JUnit Test를 선택하면 실행할 수 있다. JUnit은 한번에 여러 테스트 클래스를 동시에 실행 할 수도 있다. 이클립스 왼쪽 소스폴더 트리의 프로젝트나 패키지 디렉토리를 선택해서 위에서 설명한 실행방법 대로 하면 JUnit테스트를 한번에 실행해준다. 테스트 클래스 작성방법 JUnit이 하나의 테스트 클래스를 가져와 테스트 하는 방식(과정)1. 테스트 클래스 내부에서 메서드 레벨에 @Test가 붙고 ..
제네릭스 - 메서드나 컬렉션클래스에 대해 컴파일시 타입체크를 해주는 기능. 장점 - 컴파일 시 의도하지 않는 타입객체가 저장되는 것을 막으므로 타입안정성 제공 - 타입의 체크와 형변환을 생략할 수 있기 때문에 코드의 간략화 > 제네릭클래스 기본형태 class Student{ private T name; List list = new ArrayList(); public void setName(T name){ this.name=name; list.add(name); } public T getName(){ return this.name; } } 제네릭 클래스를 만드는 방법은 클래스 명옆에 를 붙이고 이 T와 같은 타입을 가지는 곳에 똑같이 T를 써주면 된다. T를 '타입변수'라고 하며, Type의 첫글자를 의미..
기본적으로 로그파일은 var/log 라는 디렉토리 하위에 존재한다. /var/log/maillog메일과 관련된 로그를 기록하며, 이 파일을 이용하여 어떤 메일들이 오고 가는지 확인할 수 있다.메일이 오고 간 시간, 호스트, 데몬 유저, 메일 크기 등. /var/log/messages메일, 뉴스 등을 제외한 전체적인 로그를 기록하는 파일. /var/log/secure유저의 접속 기록을 표시 /var/log/lastlog각각의 계정에 대하여 마지막으로 로그인한 정보를 기록하는 파일이다.lastlog명령어로 확인 할 수 있다. /var/log/boot.log부팅시 서비스 데몬들의 실행 상태 기록 /var/log/dmesg시스템이 부팅할 때 출력되는 메세지가 기록되어 있다. /var/log/croncron과 관..