Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I just come across this problem, and find out there seems an out of box solution for this. My integration is not out yet, will update this later.</p> <p>From the Javadoc, especially the <code>packagesToScan</code> part:</p> <blockquote> <p><code>org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean</code></p> <p>Subclass of Spring's standard LocalSessionFactoryBean for Hibernate, supporting JDK 1.5+ annotation metadata for mappings.</p> <p>Note: This class requires Hibernate 3.2 or later, with the Java Persistence API and the Hibernate Annotations add-on present.</p> <p>Example for an <code>AnnotationSessionFactoryBean</code> bean definition:</p> <pre class="lang-xml prettyprint-override"><code>&lt;bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"&gt; &lt;property name="dataSource" ref="dataSource"/&gt; &lt;property name="annotatedClasses"&gt; &lt;list&gt; &lt;value&gt;test.package.Foo&lt;/value&gt; &lt;value&gt;test.package.Bar&lt;/value&gt; &lt;/list&gt; &lt;/property&gt; &lt;/bean&gt; </code></pre> <p>Or when using classpath scanning for autodetection of entity classes:</p> <pre class="lang-xml prettyprint-override"><code>&lt;bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"&gt; &lt;property name="dataSource" ref="dataSource"/&gt; &lt;property name="packagesToScan" value="test.package"/&gt; &lt;/bean&gt; </code></pre> <p>Since: 1.2.2<br> Author: Juergen Hoeller</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload