0

Spring と Hibernate に非常に奇妙な問題があります。チュートリアルで見たように、database.properties、hibernate.xml、および datasource.xml をすべて構成しましたが、接続が機能しません。

接続プロパティを変更しても何も変わりません。

私のhibernate.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">

<!-- Hibernate session factory -->
<bean id="sessionFactory" 
    class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">

    <property name="dataSource">
      <ref bean="dataSource"/>
    </property>

    <property name="hibernateProperties">
       <props>
         <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
         <prop key="hibernate.show_sql">true</prop>
       </props>
    </property>

    <property name="packagesToScan">
        <list>
            <value>pl.devell.model</value>
        </list>
    </property>

</bean>

私の Dao クラスは機能していますが、結果が返されません。

4

1 に答える 1