본문 바로가기

전체 글

(229)
회원 관리 예제 - 백엔드 개발(1) 1. 비즈니스 요구사항 정리 * 데이터: 회원ID, 이름 * 기능: 회원 등록, 조회 * 아직 데이터 저장소가 선정되지 않음 controller: 웹 MVC의 컨트롤러 역할 service: 핵심 비즈니스 로직 구현 repository: 데이터베이스에 접근, 도메인 객체를 DB에 저장하고 관리 domain: 비즈니스 도메인 객체, 예) 회원, 주문, 쿠폰 등등 주로 데이터베이스에 저장하고 관리 2. 회원 도메인과 리포지토리 만들기 회원객체 package com.devjones.springfirst.domain; public class Member { private Long id; private String name; public Long getId() { return id; } public void set..
스프링부트와 웹 개발 1. 정적 컨텐츠 https://docs.spring.io/spring-boot/docs/2.3.1.RELEASE/reference/html/spring-boot-features.html#boot-features-spring-mvc-static-content Spring Boot Features Graceful shutdown is supported with all four embedded web servers (Jetty, Reactor Netty, Tomcat, and Undertow) and with both reactive and Servlet-based web applications. It occurs as part of closing the application context and is pe..
스프링부트 라이브러리 및 view 설정 Gradle은 의존관계가 있는 라이브러리를 함께 다운로드 한다. 스프링 부트 라이브러리 spring-boot-starter-web spring-boot-starter-tomcat: 톰캣 (웹서버) spring-webmvc: 스프링 웹 MVC spring-boot-starter-thymeleaf: 타임리프 템플릿 엔진(View) spring-boot-starter(공통): 스프링 부트 + 스프링 코어 + 로깅 spring-boot spring-core spring-boot-starter-logging logback, slf4j 테스트 라이브러리 spring-boot-starter-test junit: 테스트 프레임워크 mockito: 목 라이브러리 assertj: 테스트 코드를 좀 더 편하게 작성하게 도와..