Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8147553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:23:28+00:00 2026-06-06T14:23:28+00:00

I currently scan packages for DAOs and services using Spring 3.1 & Hibernate 4

  • 0

I currently scan packages for DAOs and services using Spring 3.1 & Hibernate 4 via <context:component-scan> Is there a way to do the same for classes marked @Entity instead of using the configLocation property and a hbm.xml file?

<hibernate-configuration>
    <session-factory>
        <mapping class="com.example.model.User" />
            <!-- etc. -->
    </session-factory>
</hibernate-configuration>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T14:23:31+00:00Added an answer on June 6, 2026 at 2:23 pm
    <bean id="sessionFactory"
      class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"
      p:dataSource-ref="dataSource"
      p:configLocation="WEB-INF/classes/hibernate.cfg.xml"
      p:packagesToScan="com.example.model"
    />
    

    Will scan everything in model package. I use my cfg.xml to contains settings like show_sql, and hb2ddl.auto.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following spring configuration: <context:component-scan base-package=uk.co.mysite.googlecontactsync.aop/> <bean name=simpleEmailSender class=uk.co.mysite.util.email.simple.SimpleEmailSenderImplementation/> <aop:aspectj-autoproxy/> Then I
Is there currently a way for my WP7 app to: Scan for available audio
The application currently I am using has a main functionality to scan QR/Bar codes
Currently, I'm using a complex countifs() statement: =countifs($B$2:$B$B1000,=&L7,'Sheet2'!$C$2:$C$1000,*)+ countifs($B$2:$B$B1000,=&L7,'Sheet2'!$D$2:$D$1000,*)+ countifs($B$2:$B$B1000,=&L7,'Sheet2'!$E$2:$E$1000,*)+ countifs($B$2:$B$B1000,=&L7,'Sheet2'!$F$2:$F$1000,*)+ countifs($B$2:$B$B1000,=&L7,'Sheet2'!$G$2:$G$1000,*) which is
I'm currently using the following code to scan files that have been uploaded as
I am currently using Symantec Scan engine .NET api for anti virus scanning. I
Currently developing an application using the newest version of symfony, obtained through PEAR. This
I'm currently using a Timer and TimerTask to perform some work every 30 seconds.
Im currently using the Barcode Scanner from the open source library Zxing in my
After a quick scan of related questions on SO, I have deduced that there's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.