簡體   English   中英

hibernate 配置 eclipse 中的 XML 文件中缺少源按鈕

[英]Source button missing from hibernate configuration XML file in eclipse

當我創建 hibernate 配置文件時,eclipse 無法顯示源代碼,因為頁面底部沒有源按鈕。 我可以在 Session 工廠和安全之間導航,而源按鈕丟失。 如何解決這個問題? 我附上了下面的圖片以供參考。 Hibernate 配置 XML 文件

制作自己的並添加以下內容:

文件名是: hibernate.cfg.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
        "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
        "http://hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
    <session-factory>
        <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
        <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/Book</property>
        <property name="hibernate.connection.username">root</property>
        <property name="hibernate.connection.password"></property>
        <property name="hibernate.connection.pool_size">1</property>
        <property name="hibernate.current_session_context_class">thread</property>
        <property name="hibernate.show_sql">true</property>
        <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>

        <mapping resource="book.hbm.xml" />
    </session-factory>
</hibernate-configuration>

如果你想了解更多關於它 go 這里

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM