과정이 아름다운 당신

mac용 intellij 단축키 구분 단축키 ctrl + alt + a action / 플러그인 ctrl + o 오버라이딩할 메소드들 리스트 조회 ctrl + t -> 2 변수 추출 ctrl + t -> 8 메소드 추출 command+shift+f 모든 파일내에서 특정문자열 검색 command+shift+t 해당 클래스 테스트 케이스 생성 command+r 현재 파일내에서 특정문자열 검색 및 대체 command+f 현재 파일내에서 특정문장열 검색 command+e 최근 작업파일 리스트 조회 command+x 해당 라인 삭제 command+d 해당 라인 복제 command+n 생성(게터, 세터, 생성자, 오버라이딩할 메소드 등) alt(opt)+enter 테스트 클래스 생성 option + enter 어노..
· Spring/mvc
JSP로 회원 관리 웹 어플리케이션을 만들어 보자 JSP 라이브러리 추가 dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' //JSP 추가 시작 implementation 'org.apache.tomcat.embed:tomcat-embed-jasper:' implementation 'javax.servlet:jstl:1.2' //JSP 추가 끝 compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-..
· Spring/mvc
회원 관리 웹 어플리케이션 요구사항 회원정보 이름 : username 나이 : age 기능 요구사항 회원 저장 회원 목록 조회 본격적으로 서블릿으로 회원 관리 웹 어플리케이션을 만들어 보자 회원 도메인 모델 package hello.servlet.domain.member; import lombok.Getter; import lombok.Setter; @Getter @Setter public class Member { private Long id; private String username; private int age; Member(){ } public Member(String username, int age){ this.username = username; this.age = age; } } 위의 패키..
While로 sum구하기 실습 1-4 public class SumWhile { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); System.out.println("1부터 n까지의 합을 구합니다"); System.out.print("n의 값 : "); int n = stdIn.nextInt(); int sum = 0; int i = 1; while (i while문이 종료될 때 == 조건이 성립하지 않을 때 == i > n 일 때 i값 출력 For로 sum구하기 실습 1-5 public class SumFor { public static void main(String[] args) { Scanner stdIn..
알고리즘이란? 문제를 해결하기 위한 것으로, 명확하게 정의되고 순서가 있는 유한 개의 규칙으로 이루어진 집합 세 값의 최댓값 구해보기 package com.in28minutes.algorithm; import java.util.Scanner; public class Max3 { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); System.out.println("세 정수의 최대 값을 구합니다"); System.out.print("a의 값 : "); int a = stdIn.nextInt(); System.out.print("b의 값 : "); int b = stdIn.nextInt(); System.out.pr..
Goal : 생성자는 무엇인지 알아보고 메서드와 차이를 알아본다. Constructor 생성자란 ? 생성자(영어: constructor, 혹은 약자로 ctor)는 객체 지향 프로그래밍에서 객체의 초기화를 담당하는 서브루틴을 가리킨다. 생성자는 객체가 처음 생성될 때 호출되어 멤버 변수를 초기화하고, 필요에 따라 자원을 할당하기도 한다. 객체의 생성 시에 호출되기 때문에 생성자라는 이름이 붙었다. 생성자는 대체로 멤버 함수와 같은 모양을 하고 있지만, 값을 반환하지 않는다는 점에서 엄밀한 의미의 함수는 아니다. A constructor is a member function of a class that is called for initializing objects when we create an object..
· Spring/mvc
HTTP 응답 메세지는 주로 다음 내용을 담아서 전달한다 단순 텍스트 응답 writer.println("ok"); HTML 응답 HTTP API - MessageBody JSON 응답 HTML 응답 @WebServlet(name="responseHtmlServlet", urlPatterns = "/response-html") public class ResponseHtmlServlet extends HttpServlet { @Override protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //Content-Type: text/html; cha..
· Spring/mvc
HttpServletResponse 역할 HTTP 응답 메세지를 생성한다 HTTP 응답코드 지정 헤더 생성 바디 생성 편의기능 제공 Content-Type, 쿠키, Redirect 직접 헤더 정보 출력해보기 @WebServlet(name="responseHeaderServlet", urlPatterns = "/response-header") public class ResponseHeaderServlet extends HttpServlet { @Override protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //[status-line] res..
· Spring/mvc
HTTP 요청 메세지를 통해 클라이언트에서 서버로 데이터를 전달하는 3가지 방법 GET 쿼리 파라미터 POST-HTML Form HTTP API 메세지 바디 HTTP 요청 데이터 - GET 쿼리 파라미터 /url ?username=rosieposie&age=22 메세지 바디없이, URL의 쿼리 파라미터에 데이터를 포함해서 전달 예) 검색, 필터, 페이징 등에서 많이 사용하는 방식 @WebServlet(name="requestParamServlet", urlPatterns = "/request-param") public class RequestParamServlet extends HttpServlet { @Override public void service(ServletRequest request, Ser..
· Spring/mvc
HttpServletRequest 역할 HTTP 요청 메세지를 개발자가 편리하게 사용할 수 있도록 HTTP를 파싱한다. 그리고 그 결과를 HttpServletRequest객체에 담아서 제공한다. HTTP 요청 메세지 POST /save HTTP/1.1 Host: localhost:8080 Content-Type: application/x-www-form-urlencoded username=rosieposie&age=22 START LINE HTTP 메소드 URL 쿼리 스트링 스키마, 프로토콜 헤더 헤더 조회 바디 form 파라미터 형식 조회 message body 데이터 직접 조회 임시 저장소 기능 해당 HTTP 요청이 시작부터 끝날 때까지 유지되는 임시 저장소 기능 저장 : request.setAttr..
dev_rosieposie
'분류 전체보기' 카테고리의 글 목록 (12 Page)