How to add Java Hibernate library to IDEA IDE? ("Cannot find Session" error)
已回答
On Windows 11, IntelliJ 2021.3.2, MySQL, Hibernate 5.6.5
I downloaded and unzipped the distribution from hibernate and MySQL and using File | Project Structure | Global Library
I added the jars.

I get this error "Cannot find Session"

请先登录再写评论。
Make sure global libraries are added to the module dependencies: https://www.jetbrains.com/help/idea/working-with-module-dependencies.html#add-a-new-dependency.