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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:00:24+00:00 2026-05-12T07:00:24+00:00

I read about Compound property names in the The Spring Framework (2.5) – Reference

  • 0

I read about Compound property names in the “The Spring Framework (2.5) – Reference Documentation – chapter 3.3.2.7“

Can i use the same concept to set values of properties? Can i use a compound string as a value expression?

<bean id="service1" class="a.b.c.Service1Impl" scope="prototype">
   <property name="service2" ref="service2"/>
   <property name="service2.user" value="this-service1-instance.user"/> 
</bean>
<bean id="service2" class="a.b.c.Service2Impl" scope="prototype">
    ... 
</bean>

User is a property of a.b.c.Service1Impl which is not in control of Spring. I want to forward this property to a.b.c.Service2Impl.

  • 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-12T07:00:24+00:00Added an answer on May 12, 2026 at 7:00 am

    Rather than use a plain old factory bean, rather use a factory method to create the bean of the property and then inject that result…

    iow

    in your case, it would look something like this…

    <!-- the bean to be created via the factory bean -->
    <bean id="exampleBean"
          factory-bean="serviceLocator"
          factory-method="createInstance"/>
    

    So the bean of id is created by calling createInstance on bean serviceLocator.

    Now spring does not support nested properties out of the box, though you could look at creating a custom editors which might provide that support – possible but tricky. Possibly not worth the effort.

    One mechanism you could look at using is nesting using the factory-bean factory-method technique…

    Something like:

    <bean id="c" class="C" />
    <bean id="b" factory-bean="c" factory-method="getB"/>
    <bean id="a" factory-bean="b" factory-method="getA"/>
    

    This will effectively expose: a.b.c where C has a method getB and A has a method getB

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

Sidebar

Ask A Question

Stats

  • Questions 173k
  • Answers 173k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Do you need to write all values to the DB… May 12, 2026 at 2:40 pm
  • Editorial Team
    Editorial Team added an answer Have you checked the links below? Uploadify forum post Codeigniter… May 12, 2026 at 2:40 pm
  • Editorial Team
    Editorial Team added an answer From digging through the Django source code, the generic view… May 12, 2026 at 2:40 pm

Related Questions

I read about Compound property names in the The Spring Framework (2.5) - Reference
Someone asked the question: INT, BIGINT or UUID/GUID in Oracle, DB2, Derby and HSQLDB?
Anyone out there have enough experience w/ NetCDF and HDF5 to give some pluses
I read about the Conditional attribute today. According to MSDN: Applying ConditionalAttribute to a
I read about using the CASE expression inside the WHERE clause here: http://scottelkin.com/sql/using-a-case-statement-in-a-sql-where-clause/ I'm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.