- Ctrl + Shift + F : 소스코드 정리 - Ctrl + 1 : 해결책 1 - Ctrl + Space : 해결책 2 - Ctrl + Shift + O : import 문 정리 - Alt + 좌 or 우 : 히스토리 내비게이션 이동 - Ctrl + Click : 자세히 보기 - Atl + 1 : 프로젝트 탭 토글 - Ctrl + Shift + R : 빠른 파일명 찾기 - Ctrl + PgUp or PgDn : 탭이동 - Ctrl + F4 : 현재 탭 닫기
1. 이클립스(eclipse) 역사가 오래되어 잘 작성된 문서, 수 많은 플러그인들이 존재하며 가장 대중적으로 사용되고 있는 IDE이다. 가장 큰 강점은 아마 무료라는 것이 아닐까 한다. 웹, 모바일, 데스크탑, 엔터프라이즈, 엠베디드 시스템 어플리케이션 개발등에 두루두루 사용되며 Eclipse 는 자바(JAVA)로 개발되어 있어 윈도우즈, 리눅스, 맥OS 등 대부분의 OS를 지원한다. 장점 - 무료다! - 여러 프로젝트를 동시에 관리할 수 있다. 단점 - 다른 IDE 툴들에 비해 느림, 하지만 하드웨어의 비약적인 발달로 인해 엄청많이 차이가 나지는 않음. - 자바로 만들어져서 자바가상머신(JVM) 위에서 실행되므로 다른 IDE에 비교해서 속도가 느리다. - 지속적인 패치에도 불구하고 자잘한 버그들이 있..
Annotation 이란? Annotation(@)은 사전적 의미로는 주석이라는 뜻이다. 자바에서 Annotation은 코드 사이에 주석처럼 쓰이며 특별한 의미, 기능을 수행하도록 하는 기술이다. 즉, 프로그램에게 추가적인 정보를 제공해주는 메타데이터라고 볼 수 있다. meta data : 데이터를 위한 데이터) 다음은 어노테이션의 용도를 나타낸 것이다. 컴파일러에게 코드 작성 문법 에러를 체크하도록 정보를 제공한다. 소프트웨어 개발 툴이 빌드나 배치시 코드를 자동으로 생성할 수 있도록 정보를 제공한다. 실행시(런타임시)특정 기능을 실행하도록 정보를 제공한다. 기본적으로 어노테이션을 사용하는 순서는 다음과 같다. 어노테이션을 정의한다. 클래스에 어노테이션을 배치한다. 코드가 실행되는 중에 Reflecti..
* Spring 이란? - JAVA의 웹 프레임워크로 JAVA 언어를 기반으로 사용한다. JAVA로 다양한 어플리케이션을 만들기 위한 프로그래밍 틀이라 할 수 있다. - 옛날에 비교하면 지금은 JAVA의 활용도가 높아졌고 따라서 프로젝트 규모도 커졌다. JAVA를 이용한 기술은 JSP, MyBatis, JPA 등 여러가지가 있는데 즉, 이 기술들이 프로젝트에 많이 쓰인다고 할 수 있다. Spring은 이 기술들을 더 편하게 사용하기 위해 만들어진 것이다. - 프로젝트를 진행하다 보면 아무리 분업을 해도 분명 중복되는 코드가 있기 마련이다. Spring은 이런 중복코드의 사용률을 줄여주고, 비즈니스 로직을 더 간단하게 해줄 수 있다. - Spring을 사용하면 다른 사람의 코드를 참조하여 쓰기 편리한데 이..
스프링 시큐리티는 스프링 기반의 애플리케이션의 보안(인증과 권한, 인가 등)을 담당하는 스프링 하위 프레임워크입니다. 즉 인증(Authenticate, 누구인지?) 과 인가(Authorize, 어떤것을 할 수 있는지?)를 담당하는 프레임워크를 말합니다. 스프링 시큐리티에서는 주로 서블릿 필터(filter)와 이들로 구성된 필터체인으로의 구성된 위임모델을 사용합니다. 그리고 보안과 관련해서 체계적으로 많은 옵션을 제공해주기 때문에 개발자 입장에서는 일일이 보안관련 로직을 작성하지 않아도 된다는 장점이 있습니다.
싱글톤 패턴이란? 싱글톤(Singleton) 패턴의 정의는 단순하다. 객체의 인스턴스가 오직 1개만 생성되는 패턴을 의미한다. 싱글톤 패턴을 사용하는 이유나 주의할 점은 조금 후에 살펴보기로 하고, 어떻게 생겼는지 그 모습을 코드로 먼저 만나보자. 싱글톤 패턴을 구현하는 방법은 여러가지가 있지만, 여기서는 객체를 미리 생성해두고 가져오는 가장 단순하고 안전한 방법을 소개하겠다. public class Singleton { private static Singleton instance \= new Singleton(); private Singleton() { // 생성자는 외부에서 호출못하게 private 으로 지정해야 한다. } public static Singleton getInstance() { ret..
Java Object를 JSON으로 변환하거나 JSON을 Java Object로 변환하는데 사용할 수 있는 Java 라이브러리. package com.tychejin.study.json; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.core.JsonGenerationException; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; public class JacksonEx..
1. 아직 커밋이 local 에 있을 때 아직 로컬에서 commit 을 하고 push 는 하지 않아 remote 에 올라가지 않은 상태일 경우 다음과 같이 하면 됩니다. 1.1. 가장 최근의 commit 수정 git commit --amend위와 같이 amend 를 이용하면 가장 마지막에 commit 한 내용을 수정할 수 있습니다. git commit --amend 를 사용하고 커밋을 수정할 수 있는 창이 뜨면, 수정을 완료한 후 esc -> :wq(저장 + 창 닫기) 를 해주면 됩니다. 1.2. 더 오래된 commit 수정 or 한 번에 여러 commit 수정 커맨드 라인에 git log 를 쳐 보세요. 로그에서 여태 자신이 한 커밋을 쭉 확인 후 어떤 커밋을 수정할 것인지 확인합니다. 만일 위에서부터..