본문 바로가기
728x90

Back-End23

스프링부트 도커 이미지 만들기 (에러 해결 과정) (feat. querydsl) Spring 공식문서 참고 : Topical Guide | Spring Boot Docker 0. project root directory에 Dockerfile을 만들고 아래 내용을 작성한다. Dockerfile 파일 FROM openjdk:11 VOLUME /tmp ARG JAR_FILE COPY ${JAR_FILE} app.jar ENTRYPOINT ["java","-jar","/app.jar"] 명령어 실행 docker build --build-arg JAR_FILE=build/libs/*.jar -t myorg/myapp . >myorg/myapp 은 이미지 이름이므로 변경 가능. 맨끝의 점까지 써야한다. Spring Boot docker image 만드는 과정에서 고생한 것들( feat. que.. 2021. 2. 22.
Web Server 와 WAS 차이 출처 : gmlwjd9405.github.io/2018/10/27/webserver-vs-was.html [Web] Web Server와 WAS의 차이와 웹 서비스 구조 - Heee's Development Blog Step by step goes a long way. gmlwjd9405.github.io 1. 역할 Web Server : 정적인 콘텐츠 제공 WAS : JSP, Servlet과 같은 동적인 컨텐츠 제공 2. 구조 Client - Web Server - WAS - DB 3. 이유 동적인 컨텐츠 필요하지 않은경우 Web Server에서 WAS까지 요청하지 않고 끝내서 부하를 줄인다. 4. 대용량 트래픽 L4 스위치를 이용해 여러대의 WAS로 분산 처리한다. > L4스위치의 가상 IP를 클라이.. 2021. 1. 1.
[백기선] 스프링 프레임워크 핵심 기술 정리5 - Validation Validation은 객체 검증용 인터페이스이다. 이클립스 스프링부트에서는 starter에 포함되어있지 않기 때문에 pom.xml에 org.springframework.boot spring-boot-starter-validation 를 새로 추가해 줘야한다. 최근 스프링 버전에서는 Validator 클래스가 Bean으로 자동 등록된다. 1. 클래스에 필드변수에 @NotEmpty 등 어노테이션 설정 public class Event { Integer id; @NotEmpty String title; @NotNull @Min(0) Integer limit; @Email String email; //... 이하 get set 메소드 } 2. Validator 클래스를 이용해 검증 package com.exam.. 2020. 10. 4.
[백기선] 스프링 프레임워크 핵심 기술 정리4 - Resource - 리소스를 가져올 때 여러 경로로 가져올 수 있다. classPathResource : classpath 기준 FileSystemResource : 파일시스템 형식 ServletContextResource : 웹 어플리케이션 루트에서 상대경로 ... 예시) Resource resource = new FileSystemResource("beanConfiguration.xml"); - Context 설정시 Class를 따른다. 예시) ApplicationContext ctx = new ClassPathXmlApplicationContext("application.xml"); > ClassPathXmlApplicationContext 클래스를 사용하므로 classpath:application.xml로 동작한.. 2020. 10. 4.
728x90