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 띄워보기를 해보도록 하겠습니다.
'웹 > 웹프로젝트' 카테고리의 다른 글
[시큐어코딩] FORBIDDEN.INSECURE_RANDOM 부적절한 난수 생성 처리 (0) | 2023.08.29 |
---|---|
웹프로젝트-4. -스프링부트- 에러페이지 만들기 (0) | 2019.09.10 |
웹프로젝트-3. -스프링부트- JSP 설정하기, Hello Word 출력 (0) | 2019.09.05 |
웹프로젝트-2. -DB (MySql)- 설치하기, database생성, user 생성 (0) | 2019.09.05 |
웹프로젝트-1. -스프링부트 - 시작하기 (0) | 2019.09.05 |