spring/spring & boot 설정

spring/spring & boot 설정

⭐️ 3. Web & WAS 경로

1. web server, web app server 웹 http 기반으로 작동 = http protocol의 규칙을 따라서 요청과 응답이 오고 간다. http 메시지 거의 모든 형태의 데어터 전송 가능 ex) HTML, TEXT, IMAGE, 음성, 영상, 파일, JSON, XML (API) 서버간에 데이터를 주고 받을 때도 대부분 HTTP 사용 2. 용어 2.1. 웹 서버(WEB) HTTP 기반으로 동작 정적 리소스 제공, 기타 부가기능 webServer가 가지고 있는 html,css.js.img,avi 를 client가 요청시, http로 응답해주는 것 ex) NGINX, APACHE 2.2. 웹 애플리케이션 서버(WAS) HTTP 기반으로 동작 웹 서버 기능 포함 + (정적 리소스 제공 가능) 프..

spring/spring & boot 설정

4. SpringBootApplication 설정, @Import, Profile, @EventListener

1. bootApplication 설정 configFile : 수동 bean 등록 file testDataInit : 초기 test file @EventListener(ApplicationReadyEvent.class) @PostConstruct bootApplication @Import @SpringBootApplication(scanBasePackages = "") app 내부 @Bean, @Profile("") application.properties main : local test : test 해당 파일 code package hello.itemservice.config; @Configuration public class MemoryConfig { @Bean public ItemService it..

spring/spring & boot 설정

⭐️ 3. Domain 이름 규칙 및 Domain package 위치

1. 패키지 구조 2. Domain ItemSearchCond & ItemUpdateDto 두개 파일 모두 DTO를 의미 팀 내, 규칙으로 파일명 설정 Cond같은 경우 목적이 검색조건 data를 넘겨 주는 것이기 때문에 dto이긴 하지만 Cond로 합의 나머지 data 이동 Domain은 끝에 Dto 붙이는 규칙 설정 완전 핵심 dto의 경우 딱 이름만 씀 Dto(data transform object) 데이터 전송 객체 기능은 없고 data를 전달만 하는 용도록 사용되는 객체 Dto 위치 최종적으로 사용하는 단계에 위치 시킴. ex) 회원 조회시, 처음으로 data를 dto에 저장하는 위치는 repository. 따라서 repository에 dto를 위치시킴 애매한 경우, Domain 폴더를 따로 두..

wooweee
'spring/spring & boot 설정' 카테고리의 글 목록