Showing:

Annotations
Attributes
Facets
Model
Properties
Element beans
Namespace http://www.springframework.org/schema/beans
Annotations
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.
Properties
content complex
Model
description{0,1} , (import | alias | bean | ANY element from ANY namespace OTHER than 'http://www.springframework.org/schema/beans') , beans*
Children alias, bean, beans, description, import
Attributes
QName Type Default Use Annotation
default-autowire restriction of xsd:NMTOKEN default optional
The default 'autowire' value; see the documentation for the
'autowire' attribute of the 'bean' element. The default is "default",
indicating inheritance from outer 'beans' sections in case of nesting,
otherwise falling back to "no" (i.e. no externally driven autowiring).
default-autowire-candidates xsd:string optional
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.
default-destroy-method xsd:string optional
The default 'destroy-method' value; see the documentation for the
'destroy-method' attribute of the 'bean' element.
default-init-method xsd:string optional
The default 'init-method' value; see the documentation for the
'init-method' attribute of the 'bean' element.
default-lazy-init defaultable-boolean default optional
The default 'lazy-init' value; see the documentation for the
'lazy-init' attribute of the 'bean' element. The default is "default",
indicating inheritance from outer 'beans' sections in case of nesting,
otherwise falling back to "false".
default-merge defaultable-boolean default optional
The default 'merge' value; see the documentation for the 'merge'
attribute of the various collection elements. The default is "default",
indicating inheritance from outer 'beans' sections in case of nesting,
otherwise falling back to "false".
profile xsd:string optional
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
Wildcard: ANY attribute from ANY namespace OTHER than 'http://www.springframework.org/schema/beans'
Attribute beans / @profile
Namespace No namespace
Annotations
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
Type xsd:string
Properties
use optional
Attribute beans / @default-lazy-init
Namespace No namespace
Annotations
The default 'lazy-init' value; see the documentation for the
'lazy-init' attribute of the 'bean' element. The default is "default",
indicating inheritance from outer 'beans' sections in case of nesting,
otherwise falling back to "false".
Type defaultable-boolean
Properties
default default
Facets
enumeration default
enumeration true
enumeration false
Attribute beans / @default-merge
Namespace No namespace
Annotations
The default 'merge' value; see the documentation for the 'merge'
attribute of the various collection elements. The default is "default",
indicating inheritance from outer 'beans' sections in case of nesting,
otherwise falling back to "false".
Type defaultable-boolean
Properties
default default
Facets
enumeration default
enumeration true
enumeration false
Attribute beans / @default-autowire
Namespace No namespace
Annotations
The default 'autowire' value; see the documentation for the
'autowire' attribute of the 'bean' element. The default is "default",
indicating inheritance from outer 'beans' sections in case of nesting,
otherwise falling back to "no" (i.e. no externally driven autowiring).
Type restriction of xsd:NMTOKEN
Properties
default default
Facets
enumeration default
enumeration no
enumeration byName
enumeration byType
enumeration constructor
Attribute beans / @default-autowire-candidates
Namespace No namespace
Annotations
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.
Type xsd:string
Properties
content simple
Attribute beans / @default-init-method
Namespace No namespace
Annotations
The default 'init-method' value; see the documentation for the
'init-method' attribute of the 'bean' element.
Type xsd:string
Properties
content simple
Attribute beans / @default-destroy-method
Namespace No namespace
Annotations
The default 'destroy-method' value; see the documentation for the
'destroy-method' attribute of the 'bean' element.
Type xsd:string
Properties
content simple