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

  • Home
  • SEARCH
  • 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 9207159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:19:42+00:00 2026-06-18T00:19:42+00:00

When I need to use Property Place Holder, I just define a bean in

  • 0

When I need to use Property Place Holder, I just define a bean in spring_config.xml as follows, without doing anything to this bean in java code, how could the spring know that?

    <bean id="configBean" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" 
        p:location="spring_test/spring.properties"></bean> 

another confused part is alike: I define two beans in spring_config.xml, namely SqlSessionFactoryBean and MapperFactoryBean, how could spring implement that the MapperFactoryBean acts just like a proxy to my DAO without I having to write any java code?

Is there any article on the mechanism of xml parsing or something related? Thanks a lot!

  • 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-18T00:19:43+00:00Added an answer on June 18, 2026 at 12:19 am

    You need to know about Java Reflection.
    Java Reflection makes it possible to inspect classes, interfaces, fields and methods at runtime, without knowing the names of the classes, methods etc. at compile time. It is also possible to instantiate new objects, invoke methods and get/set field values using reflection.
    below is simple example.

     package com.example;
    
        public class Emplyoee {    
            private String name;
            public Emplyoee() {
            }
            public String getName() {
                return name;
            }
            public void setName(String name) {
                this.name = name;
            } 
    
            public static void main(String args[]) {
                String className = "com.example.Emplyoee";
                try {
                     //finds class, casts Emplyoee class
                      Class<Emplyoee> klass = ((Class<Emplyoee>) Class.forName(className ));
                     //instantiate new objects,notice Emplyoee class
                     Emplyoee theNewObject = klass.newInstance();
                     //set value 
                     theNewObject.setName("john");
                     //calls "name" by getter method,and prints "john"
                     System.out.println(theNewObject.getName());
    
                } catch (ClassNotFoundException e) {
                     e.printStackTrace();
                } catch (InstantiationException e) {
                     e.printStackTrace();
                } catch (IllegalAccessException e) {
                     e.printStackTrace();
                }
           }
        }
    

    The Spring container will find “org.springframework.beans.factory.config.PropertyPlaceholderConfigurer” class by “forName” method and instantiate “PropertyPlaceholderConfigurer” class.

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

Sidebar

Related Questions

i need to use the animate property for a less than usual activity. i
I need to use the org.osgi.framework.system.packages.extra property to add service interfaces at runtime. These
Stupid question, but why do we need to use 'retain' when declaring a property?
I need following namespaces to use native wpf property grid however, VS 2010 doesn't
I need to know what should I use to store the property? I'm still
I need use this method with three distinct classes: Orders, Customers, Suppliers public void
I need use this code: <%= button_tag :class => btn btn-primary do %> <%=
So, I need use this event so I can navigate trought blog posts. I
I need to use a spring bean in 2 places in my mule flow.
I have a ContentControl , which I use the Content Property to place some

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.