<hibernate-mapping>
    <class name="demo.Acc" table="atm" catalog="atm">
        <id name="code" type="java.lang.String">
            <column name="code" length="11" />
            <generator class="assigned" />
        </id>
        <property name="pas" type="java.lang.Integer">
            <column name="pas" />
        </property>
        <property name="money" type="java.lang.Double">
            <column name="money" precision="10" />
        </property>
    </class>
</hibernate-mapping>
<hibernate-configuration><session-factory>
<property name="connection.username">root</property>
<property name="connection.url">
jdbc:mysql://localhost:3306/atm
</property>
<property name="dialect">
org.hibernate.dialect.MySQLDialect
</property>
<property name="connection.password">root</property>
<property name="connection.driver_class">
com.mysql.jdbc.Driver
</property>
<property name="myeclipse.connection.profile">
hibernate_demo
</property>
<property name="show_sql">true</property>
<property name="hibernate.hbm2ddl.auto">create</property>
<mapping resource="demo/Acc.hbm.xml" /></session-factory></hibernate-configuration>DTO类名是Acc,数据库名是atm。这个都没错对照过。。配置好xdoclect之后运行完,重启tomcat。数据库没反应。。