Error solution
[Error/Spring] MySQL Connection Error
miniBcake
2024. 10. 5. 18:09
DB연결을 하려고 하니 Connection 객체를 만들 때 에러가 발생했다.
DB가 바뀌어서 drivername 잘못 작성한 줄 알았는데 pom.xml을 보니 의존성 주입을 안했다....
너무 당연한 건데 buildpath에 너무 익숙해졌던 것 같다.
바로 pom.xml dependencies Edit Starters(intellij)에 들어가서 mysql의존성을 추가했다.
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>
추가한 후에는 maven 새로고침 잊지않기