java - Spring - configuring a class not as a bean though -
I have a spring-managed bean (an app-scoped or singleton in the Spring World), in which there are properties in which a list of objects is.
I would like to configure those items in XML if it is possible without too much effort.
If I declare them as bean, I inject them, but I do not want them to be spring-managed beans, the configuration is much more, and the overhead is over them beans (memory + CPU cycle) are related to making.
In Jabos Seam, JT, I can instantiate such components:
& lt; New class = "" id = "" & gt; & Lt; Arg / & gt; & Lt; Arg & gt; & Lt; New orbit = "" /> & Lt; / Arg> & Lt; / New & gt;
In JBoss Seam:
& lt; Mypackage: class-name id = "someComponent" & gt; & Lt; Component: property name = "item" & gt; & Lt; Mypackage: other-class-name title = "The Great Gesby" page = "201" /> & Lt; /...& gt; & Lt; /...& gt;
I want the main object to be a component / bean, but not the internal components. I want them to be unknown, except for the life cycle associated with their life, no life cycle can be inherited from their parents.
Internal Things Mypackage will be: Inside the other category names and the new ARG element. / P>
thanks,
Walter
I do not think that It is possible that what you need is
Been id = "external" square = "..." & gt; & Lt ;! - Instead of just using the goal of the target bean, just target the bean inline - & gt; & Lt; Property Name = "Target" & gt; & Lt; Bean class = "com.example.Person" & gt; & Lt ;! - This is an internal bean - & gt; & Lt; Property Name = "Name" Value = "Fiona Apple" /> & Lt; Property name = "age" value = "25" /> & Lt; / Bean & gt; & Lt; / Property & gt; & Lt; / Bean & gt;
Comments
Post a Comment