Lỗi jakarta.persistence.EntityManager

Description:

Parameter 0 of constructor in com.example.testcase_1.Repo.StudentRepo required a bean of type ‘jakarta.persistence.EntityManager’ that could not be found.

Action:

Consider defining a bean of type ‘jakarta.persistence.EntityManager’ in your configuration.

Process finished with exit code 0
Mn ơi em bị lỗi này thì Fix sao ạ

You are learning Lap Trinh and Lap Trinh means working a lot with APIs that are standard or need to be provided. In C/C++ you need to #include the packages you need. In Python, Java and C# you need to import them. Also, you need to be able to read English: If you read the error message carefully, you saw the suggested solution in it. Namely:

jakarta.persistence.EntityManager could not be found
Action:

Consider defining a bean of type ‘jakarta.persistence.EntityManager’ in your configuration

So you just need to follow the suggestion. I hope you understand why I don’t tell you directly where the error is, but talk about #include and import.

1 Like

“Thank you for your suggestions.”

83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?