본문 바로가기

반응형

Spring Boot

[SpringBoot] DB 연결 없이 Spring Boot 실행 시 에러 해결 증상 *************************** APPLICATION FAILED TO START *************************** Description: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. Reason: Failed to determine a suitable driver class Action: Consider the following: If you want an embedded database (H2, HSQL or Derby), please put it on the classpath. If you have d.. 더보기
[Docker] Dockerfile을이용하여 Spring 프로젝트 Image 생성 및 실행 Dockerfile Dockerfile은 새로운 image 를 만들기 위한 명령을 포함하고 있는 파일이다. 이 파일에 작성된 명령어와 base image를 통해 새로운 환경의 image를 만들 수 있다. Spring Project에 Dockerfile 생성 및 작성 아래 사진과 같이 자신의 Spring 프로젝트 폴더에 Dockerfile 이라는 이름의 파일을 생성해 준다. FROM openjdk:18-ea-jdk-slim VOLUME /tmp COPY build/libs/community-service-0.0.1-SNAPSHOT.jar community-service.jar ENTRYPOINT ["java","-jar","community-service.jar"] 작성 내용 FROM : 새로 생성할 Im.. 더보기
[Docker] Docker PostgreSQL 설치 및 실행 환경 mac - monterey 12.0.1 postgres - 14.1 spring boot - 2.5.2 docker - 20.10.10 PostgreSQL Image 설치 및 실행 먼저 DockerHub 에서 Postgres 버전을 확인해 주고 아래 명령어를 실행해 주면 Postgres Container 를 실행 (없다면 설치까지) 할 수 있다. docker run -it --rm --name postgres-test -e POSTGRES_PASSWORD=password -p 5432:5432 -d postgres 명령어 설명 (Docker 명령어) -it : 컨테이너가 실행 후 터미널 명령어를 입력하기 위해 사용 (-i 와 -t 옵션을 같이 사용하는 것) --rm : postgres 프로세스가 종.. 더보기
[Spring] Spring Boot 로그 - slf4j 와 Logback, Log4j2 의 차이점 Spring Boot의 로그 2021-11-11 11:10:58.789 INFO 40789 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.48] 2021-11-11 11:10:59.074 INFO 40789 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2021-11-11 11:10:59.075 INFO 40789 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationC.. 더보기

반응형