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 4112212
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:09:58+00:00 2026-05-20T22:09:58+00:00

I have three xml files in my spring hibernate app Spring-Security.xml <security:authentication-manager> <security:authentication-provider user-service-ref=customUserDetailsService>

  • 0

I have three xml files in my spring hibernate app

Spring-Security.xml

<security:authentication-manager>
            <security:authentication-provider user-service-ref="customUserDetailsService">

            </security:authentication-provider>
    </security:authentication-manager>

    <!-- Use a Md5 encoder since the user's passwords are stored as Md5 in the database -->
    <bean class="org.springframework.security.authentication.encoding.Md5PasswordEncoder" id="passwordEncoder"/>

    <!-- A custom service where Spring will retrieve users and their corresponding access levels  -->
    <bean id="customUserDetailsService" class="com.vaannila.service.CustomUserDetailsService" >

     </bean>

hibernate-context.xml

enter code here

<!-- Declare a datasource that has pooling capabilities-->   
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
            destroy-method="close"
            p:driverClass="${app.jdbc.driverClassName}"
            p:jdbcUrl="${app.jdbc.url}"
            p:user="${app.jdbc.username}"
            p:password="${app.jdbc.password}"
            p:acquireIncrement="5"
            p:idleConnectionTestPeriod="60"
            p:maxPoolSize="100"
            p:maxStatements="50"
            p:minPoolSize="10" />

<!-- Declare a transaction manager-->
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager" 
            p:sessionFactory-ref="sessionFactory" />

    <bean id="registrationDAO" class="com.vaannila.dao.RegistrationDAOimpl" >
  <constructor-arg ref="sessionFactory"/>
 </bean>

Now in my spring security i want something like

<bean id="customUserDetailsService" class="com.vaannila.service.CustomUserDetailsService" >
     <constructor-arg ref="registrationDAO"/>
     </bean

but my registrationDAO is in hibernate-config and when i do that in spring Security it says no bean named registration DAO

  • 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-05-20T22:09:59+00:00Added an answer on May 20, 2026 at 10:09 pm

    Spring supports reading application context across external jars. Simply add “classpath:” prefix to the context file name. Spring will look for it in the whole project.

    For instance, if you are creating web application, you might declare your business logic application context like this (web.xml)

    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            classpath:applicationContext.xml <!-- tell Spring to look for context defined on the classpath -->
        </param-value>
    </context-param>
    

    That way You’ll be able to use as many context, as necessary.

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

Sidebar

Related Questions

I have some xml data contained in three files (Database.xml, Participants.xml, and ConditionTokens.xml). I
I have a java web app running in spring web flow framework and hibernate
I have three (A,B,C) spring context.xml, A is for the basic configuration, B and
I have a large application spread across multiple Spring bean definition xml files. In
Hi I have a soap web service(java, spring, tomcat) In my web.xml file i
I have application, which uses Spring, Hibernate and Spring Security. My goal is to
I have just started a Spring Roo application with Hibernate as a JPA2.0 provider.
I've implemented LDAP authentication using Spring Security 3.1. My security.xml file for that is
Is there any tool that can parse/conver xml files to this format? I have
This is my input xml. The xml can have maximunm three nodes and minimum

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.