Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Eclipse 中使用 Wildfly 服务器和 JPA Api(休眠)-> 一切都很好(没有错误),在执行 CRUD 操作时没有问题。
现在我希望在控制台上显示查询,所以我将此属性添加到 persistence.xml:
hibernate.show_sql 是
但是控制台中没有 sql 查询日志记录。
有什么建议么 ?
您的所有控制台输出都显示 INFO 级别的日志。所以很明显,是你的日志级别阻止了休眠打印 SQL。您可能必须将日志级别设置为 DEBUG 才能查看 SQL。
请在这方面查看以下线程 -
显示休眠 SQL 到控制台(春季)