분류 전체보기

    728x90
    반응형

    Bitbucket - commit compare(commit 묶어서 compare)

    Bitbucket을 이용해서 코드리뷰시에 commit을 여러번 했을 경우 commit을 한번에 묶어서 비교하는 방법을 정리해보려고 한다. 1. Bitbucket 페이지에서 Compare 아이콘을 클릭한다. 2. Compare 화면에서 Source와 Destination에서 Branches, Tags, Commits 중에서 하나를 선택할 수 있는데 Commits을 선택하고 Source에서 수정된 commit revision number를 입력하고 Destination에서 수정전 commit revision number를 입력해주면 된다. commit revision number는 commit object를 식별할 수 있는 숫자이다. 아래와 같이 commit을 여러번 했다면 마지막 commit revisio..

    Junit - MockServletContext 사용

    Junit 테스트 소스에서 ServletContext를 사용해야 할 경우 MockServletContext를 사용하면 된다. MockServletContext은 org.springframework.mock.web 패키지에 있고 ServletContext를 구현하고 있다. public class MockServletContext implements ServletContext { public MockServletContext() { this("", (ResourceLoader)null); } } ServletContext sc = new MockServletContext(); https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/sprin..

    Template literal(템플릿 리터럴) If문 사용

    Template literal(템플릿 리터럴) : ES6 (ECMAScript 2015)에서 도입된 문자열을 더욱 간편하게 생성하고 조작할 수 있는 기능. 역따옴표(backtick) (`) 문자로 감싸진 문자열을 의미하고 이 안에 변수, 표현식, 다른 문자열을 쉽게 포함시킬 수 있다. 템플릿 리터럴의 주요 특징 1. 변수 삽입 템플릿 리터럴 내에서 ${변수} 형식을 사용하여 변수를 삽입할 수 있다. 이렇게 삽입된 변수는 실제 값으로 대체되어 문자열이 생성된다. const name = '철수'; const greeting = `제 이름은 ${name}입니다.`; // 제 이름은 철수입니다. 2. 다중 라인 문자열 다중 라인 문자열을 간편하게 작성할 수 있음. 일반적인 문자열에서는 줄바꿈을 위해 이스케이프 ..

    Retrofit으로 여러개의 API를 하나의 DTO 객체로 처리하는 방법

    Retorfit : Android와 Java에서 HTTP 통신을 위해 사용하는 라이브러리 Interface, Retrofit Class, Call로 구성됨 Interface : HTTP API 선언 Retrofit Class : Interface의 구현을 생성함 Call : Retrofit Class로 생성된 interface를 사용해서 생성함, 동기 or 비동기 HTTP 요청을 호출함 ● Interface public interface CounselApiInterface { @GET("selectCounselListApi") Call searchCounselList(@Query("page") int page, @Query("perPage") int perPage); } ● Retrofit Class, ..

    728x90
    반응형