반응형 profile2 Docker build 할때 parameter 처리 방법 Spring boot Application 을 Dockerfile 로 build 할 때에 profile 값을 전달 해야해서 찾아본 것을 적어보았다. profile 값을 전달하기 위해서는 다음과 같은 방법들이 있다. 1.Dockerfile 에 profile 값을 넣고 build 를 한다. FROM java:8 ADD target/app.jar app.jar RUN bash -c 'touch /app.jar' ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom","-Dspring.profiles.active=dev","-jar","/app.jar"] 2.Docker run 할때 환경 변수로 전달한다. docker run -d -p 8080:8080 -.. 2019. 8. 1. [SpringBoot] Properties 우선순위 Spring Boot 에서 Properties 를 설정하는 방법에 대해서 알아보자. 우선 Properties 파일을 3개를 만들어 보았다.src/main/resources 하위에 application.properties, application-server1.properties, application-server2.properties 이렇게 3개의 파일을 만들었다. application.properties1234application-name: my applicatoinspring.output.ansi.enabled=alwayslogging.level.org.springframework.web=debugserver.port=9000cs application-server1.properties1server.po.. 2018. 6. 7. 이전 1 다음 728x90 반응형