Definition Type: Element
Name: beans
Namespace: http://www.springframework.org/schema/beans
Containing Schema: spring-beans-3.1.xsd
Abstract
Documentation:
Container for <bean> and other elements, typically the root element in the document. Allows the definition of default values for all nested bean definitions. May itself be nested for the purpose of defining a subset of beans with certain default values or to be registered only when certain profile(s) are active. Any such nested <beans> element must be declared as the last element in the document.
Collapse XSD Schema Diagram:
Drilldown into beans in schema spring-beans-3_1_xsd Drilldown into bean in schema spring-beans-3_1_xsd Drilldown into alias in schema spring-beans-3_1_xsd Drilldown into import in schema spring-beans-3_1_xsd Drilldown into description in schema spring-beans-3_1_xsd Drilldown into default-destroy-method in schema spring-beans-3_1_xsd Drilldown into default-init-method in schema spring-beans-3_1_xsd Drilldown into default-autowire-candidates in schema spring-beans-3_1_xsd Drilldown into default-autowire in schema spring-beans-3_1_xsd Drilldown into default-merge in schema spring-beans-3_1_xsd Drilldown into default-lazy-init in schema spring-beans-3_1_xsd Drilldown into profile in schema spring-beans-3_1_xsdXSD Diagram of beans in schema spring-beans-3_1_xsd (Membrane Service Proxy)
Collapse XSD Schema Code:
<xsd:element name="beans">
    <xsd:annotation>
        <xsd:documentation><![CDATA[
	Container for <bean> and other elements, typically the root element in the document.
	Allows the definition of default values for all nested bean definitions. May itself
	be nested for the purpose of defining a subset of beans with certain default values or
	to be registered only when certain profile(s) are active. Any such nested <beans> element
	must be declared as the last element in the document.
			]]></xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
        <xsd:sequence>
            <xsd:element ref="description" minOccurs="0" />
            <xsd:choice minOccurs="0" maxOccurs="unbounded">
                <xsd:element ref="import" />
                <xsd:element ref="alias" />
                <xsd:element ref="bean" />
                <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded" />
            </xsd:choice>
            <xsd:element ref="beans" minOccurs="0" maxOccurs="unbounded" />
        </xsd:sequence>
        <xsd:attribute name="profile" use="optional" type="xsd:string">
            <xsd:annotation>
                <xsd:documentation><![CDATA[
	The set of profiles for which this <beans> element should be parsed. Multiple profiles
	can be separated by spaces, commas, or semi-colons.

	If one or more of the specified profiles are active at time of parsing, the <beans>
	element will be parsed, and all of its <bean> elements registered, &lt;import&gt;
	elements followed, etc.  If none of the specified profiles are active at time of
	parsing, then the entire element and its contents will be ignored.

	If a profile is prefixed with the NOT operator '!', e.g.

		<beans profile="p1,!p2">

	indicates that the <beans> element should be parsed if profile "p1" is active or
	if profile "p2" is not active.

	Profiles are activated in one of two ways:
		Programmatic:
			ConfigurableEnvironment#setActiveProfiles(String...)
			ConfigurableEnvironment#setDefaultProfiles(String...)

		Properties (typically through -D system properties, environment variables, or
		servlet context init params):
			spring.profiles.active=p1,p2
			spring.profiles.default=p1,p2
					]]></xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="default-lazy-init" default="default" type="defaultable-boolean">
            <xsd:annotation>
                <xsd:documentation><![CDATA[
	The default 'lazy-init' value; see the documentation for the
	'lazy-init' attribute of the 'bean' element.
					]]></xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="default-merge" default="default" type="defaultable-boolean">
            <xsd:annotation>
                <xsd:documentation><![CDATA[
	The default 'merge' value; see the documentation for the
	'merge' attribute of the various collection elements. The default
	is 'false'.
					]]></xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="default-autowire" default="default">
            <xsd:annotation>
                <xsd:documentation><![CDATA[
	The default 'autowire' value; see the documentation for the
	'autowire' attribute of the 'bean' element. The default is 'default'.
					]]></xsd:documentation>
            </xsd:annotation>
            <xsd:simpleType>
                <xsd:restriction base="xsd:NMTOKEN">
                    <xsd:enumeration value="default" />
                    <xsd:enumeration value="no" />
                    <xsd:enumeration value="byName" />
                    <xsd:enumeration value="byType" />
                    <xsd:enumeration value="constructor" />
                </xsd:restriction>
            </xsd:simpleType>
        </xsd:attribute>
        <xsd:attribute name="default-autowire-candidates" type="xsd:string">
            <xsd:annotation>
                <xsd:documentation><![CDATA[
	A default bean name pattern for identifying autowire candidates:
	e.g. "*Service", "data*", "*Service*", "data*Service".
	Also accepts a comma-separated list of patterns: e.g. "*Service,*Dao".
	See the documentation for the 'autowire-candidate' attribute of the
	'bean' element for the semantic details of autowire candidate beans.
					]]></xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="default-init-method" type="xsd:string">
            <xsd:annotation>
                <xsd:documentation><![CDATA[
	The default 'init-method' value; see the documentation for the
	'init-method' attribute of the 'bean' element.
					]]></xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="default-destroy-method" type="xsd:string">
            <xsd:annotation>
                <xsd:documentation><![CDATA[
	The default 'destroy-method' value; see the documentation for the
	'destroy-method' attribute of the 'bean' element.
					]]></xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
        <xsd:anyAttribute namespace="##other" processContents="lax" />
    </xsd:complexType>
</xsd:element>
Collapse Child Elements:
Name Type Min Occurs Max Occurs
description beans:description 0 (1)
import beans:import (1) (1)
alias beans:alias (1) (1)
bean beans:bean (1) (1)
beans beans:beans 0 unbounded
<xs:any> Allowed namespace: '##other' 0 unbounded
Collapse Child Attributes:
Name Type Default Value Use
profile beans:profile Optional
default-lazy-init beans:default-lazy-init default (Optional)
default-merge beans:default-merge default (Optional)
default-autowire beans:default-autowire default (Optional)
default-autowire-candidates beans:default-autowire-candidates (Optional)
default-init-method beans:default-init-method (Optional)
default-destroy-method beans:default-destroy-method (Optional)
<anyAttribute> Allowed namespace: '##other'