在application.properties中加入以下两行 spring.jpa.properties.hibernate.format_sql=true spring.jpa.properties.hibernate.show_sql=true 运行起来看到这样的结果