dev_공부일지/JPA 에러 정리

org.springframework.mail.MailSendException: Mail server connection failed. Failed messages: jakarta.mail.NoSuchProviderException: smtp

dev_0hoon 2024. 3. 25. 15:37

 

해당 오류는 

dependencies {
	implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
	implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
	implementation 'org.springframework.boot:spring-boot-starter-web'
	implementation 'org.springframework.boot:spring-boot-starter-validation'
	implementation 'org.springframework.security:spring-security-crypto'
	implementation 'org.springframework.boot:spring-boot-starter-mail'
    implementation 'org.jetbrains:annotations:20.1.0'
	implementation group: 'com.sun.mail', name: 'javax.mail', version: '1.6.2'
	implementation group: 'javax.activation', name: 'activation', version: '1.1.1'

	compileOnly 'org.projectlombok:lombok'
	runtimeOnly 'org.mariadb.jdbc:mariadb-java-client'
	annotationProcessor 'org.projectlombok:lombok'
	testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

 

위처럼 부트 다른 라이브러리는 최신버전으로 알아서 업데이트 되게 되어있지만 starter-mail을 사용함에도 다른 라이브러리를 사용하며 특히 버전 지정까지해서 호환이 안된 것으로보인다.

 


implementation group: 'cohttp://m.sun.mail', name: 'javax.mail', version: '1.6.2'
implementation group: 'javax.activation', name: 'activation', version: '1.1.1'

 

를 지우는 것으로 해결