웹프로젝트-3. -스프링부트- 실행해보기

2019. 9. 5. 17:08웹/웹프로젝트

DB 설치후 USER와 database를 만들어 주었습니다. 

중간에 진행하다말고 DB를 해줬던 이유는 스프링부트를 실행시켜보니 DB 접근 오류가 떨어져서 였습니다..

(pom에 특정 기능이 추가 되어있어서 그런지, 원래 db를 접근해야 실행가능한건지는 의문)

 

 

어쨌든 DB를 구성했으니 제대로 실행되는지 테스트를 위해 

appication.properties 에

 

server.port=9090
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/kecmok?characterEncoding=UTF-8
spring.datasource.username=kecmok
spring.datasource.password=kecmok

spring.devtools.livereload.enabled=true
spring.thymeleaf.cache=false

 

위와 같이 접근 정보를 설정해 주었습니다.

 

java.sql.SQLException: The server time zone value '���ѹα� ǥ�ؽ�' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.

 

 

위와 같은 오류가 발생했습니다.

 

 

 

오류를 구글링 해보니

– 에러 유형 –

1. The server time zone value ‘KST’ is unrecognized or represents more than one time zone : mysql-connector-java 버전 5.1.X 이후 버전부터 KST 타임존을 인식하지 못하는 이슈

: The server time zone value ‘KST’ is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.

 

 

jdbc:mysql://ip:port/kecmok?characterEncoding=UTF-8&serverTimezone=UTC

 

위와 같이 serverTimezone=을추가하여 해결할 수 있다고 하여 시도했습니다.

 

에러는 해결되었고

 

 

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'amazonRDS': Invocation of init method failed; nested exception is java.lang.IllegalStateException: There is no EC2 meta data available, because the application is not running in the EC2 environment. Region detection is only possible if the application is running on a EC2 instance

 

 

 

 

 

위와 같이 아마존 에러가 떠서 당장은 사용할 것이 아니니

pom.xml  에 아마존을 담당하는것 같은 부분을 주석처리 시켜줍니다.

그후 실행시키니

제대로 실행된것 같습니다~

 

이제 다음에는 jsp 로 Hello Word 띄워보기를 해보도록 하겠습니다.

 

반응형