SpringBoot 2.X 정리
  • README
  • 1. SpringBoot 처음 사용할 때 + Lombok 설명
  • 2. Spring Data JPA
  • 3. Spring Data JPA 를 이용한 쿼리 연습
  • 4. JPA 연관관계 처리
  • 5. Thymeleaf 사용법
  • 6. Spring MVC 를 이용한 게시판 구현연습
  • 7. Spring Security 4 JDBC 를 이용한 로그인 인증방법
  • 8. Maven -> Gradle 변경작업
  • 9. React 구성하기
  • 10. SpringSecurity 인증 후 로그인 객체는 어떻게?
  • 11. SpringBoot에서 Amazon SES 서비스 사용하기
  • 12. SpringBoot에서 ElasticBeanStalk ebextensions 파일 만들기
  • 오류 상황과 대처법
    • 1. Querydsl
    • 2. MYSQL 오류 대처법
    • 3.Ajax CSRF 대처법
    • 4. Heroku 배포하기
    • 5. 프로젝트 이름 변경
    • 6. Gradle 오류 대처법
    • 7. React 오류 대처법
    • 8. Tymeleaf LocalDateTime
    • 9. JpaAuditing을 통한 시간 동기화
    • 10. AWS RDS timezone과 charset 변경
Powered by GitBook
On this page

Was this helpful?

12. SpringBoot에서 ElasticBeanStalk ebextensions 파일 만들기

Springboot에서 작업을 하다가 ElasticBeanStalk 을 쓰려고 하면 환경설정을 해야될 경우가 있다.

특히 시간이 ElasticBeanStalk 에서는 GMT +0 으로 되어있어 한국에서 쓰려고 하면 KST 로 맞추어 주어야 된다.

그러려면 ElasticBeanStalk 에서 말하고 있는 .ebextensions에 대해 설정을 해야된다.

  1. 로컬타임 시간 바꾸기

1) pom.xml 하단에 플러그인 추가 => src/main/ebextenstions를 war로 압축한 뒤 .ebextemsions로 만들겠다는 의미다.

<plugin>
    <artifactId>maven-war-plugin</artifactId>
    <configuration>
        <webResources>
            <resource>
                <directory>src/main/ebextensions</directory>
                <targetPath>.ebextensions</targetPath>
                <filtering>true</filtering>
            </resource>
        </webResources>
    </configuration>
</plugin>

2) 1번을 마치면 war 압축을 풀어보면 아래와 같다.

.WEB-INF/
.META-INF/
.ebextensions/
    - 01-timezone.config => 이 파일을 만들것이다.

3) 01-timezone.config =>인터넷에 예시도 많지만 따라해본 결과 모두 Command rm not 이라는 'rm' 명령어가 없다고 에러가 발생했다. 따라서 본인이 실행해본 결과 이것이 제일 정확하다.

commands:
  01link_seoul_zone:
    command: "ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime"
  1. 로컬타임 시간바꾸기 ( aws에서 명령어로 바꾸기 )

ElasticBeanstalk configuration > Software Configuration > Container Options JVM command line options에 아래를 추가 하면 된다. -Duser.timezone=Asia/Seoul

Previous11. SpringBoot에서 Amazon SES 서비스 사용하기Next오류 상황과 대처법

Last updated 5 years ago

Was this helpful?