0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

SpringBootの@Transactionalでannotationがみつからない

Posted at

はじめに

SpringBootでトランザクションのアノテーションをしたところ、ライブラリが見つからない問題があったので簡単にまとめます

問題

BookService.kt
import org.springframework.transaction.annotation.Transactional

ここでtransactionがないというエラーがでてしまった

解決方法

以下を依存関係に追加したところエラーが消えた

build.gradle.kt
	implementation("org.springframework:spring-tx")

おわりに

以前同じようにAPIを作っていたときには問題なくアノテーションが使えていたので謎でしたが、エラーが消えてよかったです

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?