관리 메뉴

웹개발자의 기지개

[Spring Boot] mysql8 에러 - WARN: Establishing SSL connection without server's identity verification is not recommended. 본문

Java/Spring Boot

[Spring Boot] mysql8 에러 - WARN: Establishing SSL connection without server's identity verification is not recommended.

http://portfolio.wonpaper.net 2023. 7. 31. 13:54

 

WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

 

 에러메세지 설명 그대로, Mysql 5점대 이상의 버전에서 SSL 이 더욱 사용여부 등의 속성을 명확히 담아서 추가하라는 내용이다.

 

 

[ resources/application.properties ]

 

 

server.port=8030

# JSP
spring.mvc.view.prefix=/WEB-INF/views/
spring.mvc.view.suffix=.jsp

#spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
#spring.datasource.url=jdbc:mariadb://localhost:3306/spring?characterEncoding=UTF-8
#spring.datasource.username=root
#spring.datasource.password=1111

spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/spring?characterEncoding=UTF-8&verifyServerCertificate=false&useSSL=false
spring.datasource.username=root
spring.datasource.password=비밀번호

# mybatis
mybatis.mapper-locations=classpath:mybatis/mapper/**/**.xml

 

spring.datasource.url=jdbc:mysql://localhost:3306/spring?characterEncoding=UTF-8&verifyServerCertificate=false&useSSL=false

 

 

 

참고 : https://www.lesstif.com/java/java-mysql-8-establishing-ssl-connection-without-server-s-identity-verification-is-not-recommended-113346792.html

 

Comments