목록인프런 (46)
오늘이라도
https://github.com/upcake/hello-spring 강의 링크 * 오늘의 단축키 & 기능 1. 자바 코드로 직접 스프링 빈 등록하기 - MemberService, MemoryMemberRepository의 어노테이션을 제거하고 진행한다. - SpringConfig.java @Configuration //설정 파일 public class SpringConfig { @Bean //스프링 빈을 내가 등록할 거야 public MemberService memberService() { return new MemberService(memberRepository()); } @Bean public MemberRepository memberRepository() { //interface는 new가 안되므..
https://github.com/upcake/hello-spring 강의 링크 * 오늘의 단축키 & 기능 1. 스프링 빈을 등록하고, 의존관계 설정하기 - 회원 컨트롤러가 회원서비스와 회원 리포지토리를 사용할 수 있게 의존관계를 준비하자. - 회원 컨트롤러에 의존관계 추가 - MemberController.class package com.upcake.hellospring.controller; import com.upcake.hellospring.service.MemberService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @Controlle..
https://github.com/upcake/hello-spring 강의 링크 * 오늘의 단축키 & 기능 - 테스트 클래스 만들기 : Ctrl + Shift + T - 소개용 변수(Extract Introduce Variable) 추출 : Crtl + Alt + v - 상호작용 기능 보기 : Alt + Enter - 최적화 Import : Ctrl + Alt + o - 라인 주석 : Ctrl + / - 블록 주석 : Ctrl + Shift + / - 실행 : Shift + F10 - 디버그 : Shift + F9 1. 회원 서비스 테스트 MemberServiceTest.class package com.upcake.hellospring.service; import com.upcake.hellospring..
https://github.com/upcake/hello-spring 강의 링크 * 오늘의 단축키 & 기능 - 메소드 추출 : Ctrl + Alt + m 1. 회원 서비스 클래스 작성 package com.upcake.hellospring.service; import com.upcake.hellospring.domain.Member; import com.upcake.hellospring.repository.MemberRepository; import com.upcake.hellospring.repository.MemoryMemberRepository; import java.util.List; import java.util.Optional; public class MemberService { private..
https://github.com/upcake/hello-spring 강의 링크 * 오늘의 단축키 & 기능 - soutv로 바로 value를 sysout 하는게 가능 - 실행취소(undo) : Ctrl + z - 실행취소취소(redo) : Ctrl + Shift + z - Rename : Shift + F6 - 변수 추출 : Ctrl + Alt + t 1. 회원 리포지토리 테스트 케이스 작성 - 개발한 기능을 실행해서 테스트할 때 자바의 main 메서드를 통해서 실행하거나, 웹 애플리케이션의 컨트롤러를 통해서 해당 기능을 실행한다. 이러한 방법은 준비하고 실행하는데 오래 걸리고, 반복 실행하기 어렵고 여러 테스트를 한번에 실행하기 어렵다는 단점이 있다. 자바는 JUnit이라는 프레임워크로 테스트를 실행해..
https://github.com/upcake/hello-spring 강의 링크 1. 도메인, 리포지토리 클래스 파일 작성 package com.upcake.hellospring.domain; public class Member { private Long id; //시스템이 정하는 key 값 private String name; //고객의 이름 public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } } - Member.class package com..