简体   繁体   English

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

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

When I created a hibernate Configuration file, eclipse is not able to display the source code as there is no source button at the bottom of the page.当我创建 hibernate 配置文件时,eclipse 无法显示源代码,因为页面底部没有源按钮。 I can able to navigate between Session Factory and Security whereas Source button is missing.我可以在 Session 工厂和安全之间导航,而源按钮丢失。 How can fix this issue?如何解决这个问题? I have attached the picture below for reference.我附上了下面的图片以供参考。 Hibernate Configuration XML File Hibernate 配置 XML 文件

make your own one and add the below:制作自己的并添加以下内容:

fileName is: hibernate.cfg.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>

And if you want to read more about it go here如果你想了解更多关于它 go 这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM