這個問題在這里已經有了答案:
為什么會出現這個錯誤?是因為我在使用 Hibernate.Session 嗎?
uj5u.com熱心網友回復:
這個解決方案是陳杰諾建議的。我按照鏈接org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
事實證明,使用spring boot組態檔時,不需要hibernate配置,即hibernate.cfg.xml。我還編輯了我的 application.yml spring 組態檔。這是我添加的
database-platform: org.hibernate.dialect.MySQLDialect
show-sql: false
所以現在它看起來像:
spring:
datasource:
url: jdbc:mysql://localhost:3306/search-engine
username: landsreyk
password: 12345678
jpa:
database-platform: org.hibernate.dialect.MySQLDialect
show-sql: false
hibernate:
ddl-auto: none
sites:
- url: http://www.playback.ru
name: PlayBack.ru
- url: https://www.lenta.ru
name: Лента.ру
- url: https://www.skillbox.ru
name: Skillbox
user-agent: LandsreykSearchBot/1.0 ( http://www.google.com/bot.html)
referrer: http://www.google.com
web-interface: /admin
現在,我的 Web 應用程式啟動時沒有錯誤,初始頁面顯示在 Apache Tomcat 放置它的 localhost:8080 處。
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/375405.html
