본문 바로가기

Development/Spring Framework

[에러 기록] Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

[해결 못한 포스팅]

 

1차 에러 발생

아래와 같이 수정

spring.datasource.username=crowdFunding
spring.datasource.password=crowdFunding
spring.datasource.url=jdbc:log4jdbc:mysql://localhost:3306/crowdFunding
#net.sf.log4jdbc.sql.jdbcapi.DriverSpy
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
log4jdbc.spylogdelegator.name=net.sf.log4jdbc.log.slf4j.Slf4jSpyLogDelegator

 

2차 에러 발생

Driver com.mysql.cj.jdbc.Driver claims to not accept jdbcUrl

spring.datasource.username=crowdFunding
spring.datasource.password=crowdFunding

#jdbc:log4jdbc:mysql://localhost:3306/crowdFunding
spring.datasource.url=jdbc:mysql://localhost:3306/crowdFunding

#net.sf.log4jdbc.sql.jdbcapi.DriverSpy
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
log4jdbc.spylogdelegator.name=net.sf.log4jdbc.log.slf4j.Slf4jSpyLogDelegator

 

3차 에러 발생

Access denied for user 'crowdFunding'@'172.17.0.1' (using password: YES)