@@ -17,10 +17,10 @@ construction of classes, or a mechanism such as the __Service Locator__ pattern.
1717
1818The `org.springframework.beans` and `org.springframework.context` packages are the basis
1919for Spring Framework's IoC container. The
20- {javadoc-baseurl}/org/springframework /beans/factory/BeanFactory.html[`BeanFactory`]
20+ {api-spring-framework} /beans/factory/BeanFactory.html[`BeanFactory`]
2121interface provides an advanced configuration mechanism capable of managing any type of
2222object.
23- {javadoc-baseurl}/org/springframework /context/ApplicationContext.html[`ApplicationContext`]
23+ {api-spring-framework} /context/ApplicationContext.html[`ApplicationContext`]
2424is a sub-interface of `BeanFactory`. It adds easier integration with Spring's AOP
2525features; message resource handling (for use in internationalization), event
2626publication; and application-layer specific contexts such as the `WebApplicationContext`
@@ -55,8 +55,8 @@ between such objects.
5555Several implementations of the `ApplicationContext` interface are supplied
5656out-of-the-box with Spring. In standalone applications it is common to create an
5757instance of
58- {javadoc-baseurl}/org/springframework /context/support/ClassPathXmlApplicationContext.html[`ClassPathXmlApplicationContext`]
59- or {javadoc-baseurl}/org/springframework /context/support/FileSystemXmlApplicationContext.html[`FileSystemXmlApplicationContext`].
58+ {api-spring-framework} /context/support/ClassPathXmlApplicationContext.html[`ClassPathXmlApplicationContext`]
59+ or {api-spring-framework} /context/support/FileSystemXmlApplicationContext.html[`FileSystemXmlApplicationContext`].
6060 While XML has been the traditional format for defining configuration metadata you can
6161instruct the container to use Java annotations or code as the metadata format by
6262providing a small amount of XML configuration to declaratively enable support for these
@@ -2298,7 +2298,7 @@ The following scopes are supported out of the box. You can also create
22982298====
22992299As of Spring 3.0, a __thread scope__ is available, but is not registered by default. For
23002300more information, see the documentation for
2301- {javadoc-baseurl}/org/springframework /context/support/SimpleThreadScope.html[`SimpleThreadScope`].
2301+ {api-spring-framework} /context/support/SimpleThreadScope.html[`SimpleThreadScope`].
23022302For instructions on how to register this or any other custom scope, see
23032303<<beans-factory-scopes-custom-using>>.
23042304====
@@ -2712,7 +2712,7 @@ To integrate your custom scope(s) into the Spring container, you need to impleme
27122712`org.springframework.beans.factory.config.Scope` interface, which is described in this
27132713section. For an idea of how to implement your own scopes, see the `Scope`
27142714implementations that are supplied with the Spring Framework itself and the
2715- {javadoc-baseurl}/org/springframework /beans/factory/config/Scope.html[`Scope` javadocs],
2715+ {api-spring-framework} /beans/factory/config/Scope.html[`Scope` javadocs],
27162716which explains the methods you need to implement in more detail.
27172717
27182718The `Scope` interface has four methods to get objects from the scope, remove them from
@@ -4091,11 +4091,11 @@ configuration (notice the inclusion of the `context` namespace):
40914091----
40924092
40934093(The implicitly registered post-processors include
4094- {javadoc-baseurl}/org/springframework /beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.html[`AutowiredAnnotationBeanPostProcessor`],
4095- {javadoc-baseurl}/org/springframework /context/annotation/CommonAnnotationBeanPostProcessor.html[`CommonAnnotationBeanPostProcessor`],
4096- {javadoc-baseurl}/org/springframework /orm/jpa/support/PersistenceAnnotationBeanPostProcessor.html[`PersistenceAnnotationBeanPostProcessor`],
4094+ {api-spring-framework} /beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.html[`AutowiredAnnotationBeanPostProcessor`],
4095+ {api-spring-framework} /context/annotation/CommonAnnotationBeanPostProcessor.html[`CommonAnnotationBeanPostProcessor`],
4096+ {api-spring-framework} /orm/jpa/support/PersistenceAnnotationBeanPostProcessor.html[`PersistenceAnnotationBeanPostProcessor`],
40974097as well as the aforementioned
4098- {javadoc-baseurl}/org/springframework /beans/factory/annotation/RequiredAnnotationBeanPostProcessor.html[`RequiredAnnotationBeanPostProcessor`].)
4098+ {api-spring-framework} /beans/factory/annotation/RequiredAnnotationBeanPostProcessor.html[`RequiredAnnotationBeanPostProcessor`].)
40994099
41004100[NOTE]
41014101====
@@ -4836,7 +4836,7 @@ Generic qualifiers also apply when autowiring Lists, Maps and Arrays:
48364836=== CustomAutowireConfigurer
48374837
48384838The
4839- {javadoc-baseurl}/org/springframework /beans/factory/annotation/CustomAutowireConfigurer.html[`CustomAutowireConfigurer`]
4839+ {api-spring-framework} /beans/factory/annotation/CustomAutowireConfigurer.html[`CustomAutowireConfigurer`]
48404840is a `BeanFactoryPostProcessor` that enables you to register your own custom qualifier
48414841annotation types even if they are not annotated with Spring's `@Qualifier` annotation.
48424842
@@ -4918,7 +4918,7 @@ name "movieFinder" injected into its setter method:
49184918The name provided with the annotation is resolved as a bean name by the
49194919`ApplicationContext` of which the `CommonAnnotationBeanPostProcessor` is aware. The
49204920names can be resolved through JNDI if you configure Spring's
4921- {javadoc-baseurl}/org/springframework /jndi/support/SimpleJndiBeanFactory.html[`SimpleJndiBeanFactory`]
4921+ {api-spring-framework} /jndi/support/SimpleJndiBeanFactory.html[`SimpleJndiBeanFactory`]
49224922explicitly. However, it is recommended that you rely on the default behavior and simply
49234923use Spring's JNDI lookup capabilities to preserve the level of indirection.
49244924====
@@ -5464,7 +5464,7 @@ were detected, the names would be myMovieLister and movieFinderImpl:
54645464====
54655465If you do not want to rely on the default bean-naming strategy, you can provide a custom
54665466bean-naming strategy. First, implement the
5467- {javadoc-baseurl}/org/springframework /beans/factory/support/BeanNameGenerator.html[`BeanNameGenerator`]
5467+ {api-spring-framework} /beans/factory/support/BeanNameGenerator.html[`BeanNameGenerator`]
54685468interface, and be sure to include a default no-arg constructor. Then, provide the
54695469fully-qualified class name when configuring the scanner:
54705470====
@@ -5516,7 +5516,7 @@ within the annotation:
55165516====
55175517To provide a custom strategy for scope resolution rather than relying on the
55185518annotation-based approach, implement the
5519- {javadoc-baseurl}/org/springframework /context/annotation/ScopeMetadataResolver.html[`ScopeMetadataResolver`]
5519+ {api-spring-framework} /context/annotation/ScopeMetadataResolver.html[`ScopeMetadataResolver`]
55205520interface, and be sure to include a default no-arg constructor. Then, provide the
55215521fully-qualified class name when configuring the scanner:
55225522====
@@ -6373,7 +6373,7 @@ Sometimes it is helpful to provide a more detailed textual description of a bean
63736373be particularly useful when beans are exposed (perhaps via JMX) for monitoring purposes.
63746374
63756375To add a description to a `@Bean` the
6376- {javadoc-baseurl}/org/springframework /context/annotation/Description.html[`@Description`]
6376+ {api-spring-framework} /context/annotation/Description.html[`@Description`]
63776377annotation can be used:
63786378
63796379[source,java,indent=0]
@@ -6837,7 +6837,7 @@ profile has been enabled in the Spring `Environment` (see <<beans-definition-pro
68376837for details).
68386838
68396839The `@Profile` annotation is actually implemented using a much more flexible annotation
6840- called {javadoc-baseurl}/org/springframework /context/annotation/Conditional.html[`@Conditional`].
6840+ called {api-spring-framework} /context/annotation/Conditional.html[`@Conditional`].
68416841The `@Conditional` annotation indicates specific
68426842`org.springframework.context.annotation.Condition` implementations that should be
68436843consulted before a `@Bean` is registered.
@@ -6867,7 +6867,7 @@ method that returns `true` or `false`. For example, here is the actual
68676867 }
68686868----
68696869
6870- See the {javadoc-baseurl}/org/springframework /context/annotation/Conditional.html[
6870+ See the {api-spring-framework} /context/annotation/Conditional.html[
68716871`@Conditional` javadocs] for more detail.
68726872
68736873[[beans-java-combining]]
@@ -7063,7 +7063,7 @@ jdbc.password=
70637063[[beans-environment]]
70647064== Environment abstraction
70657065
7066- The {javadoc-baseurl}/org/springframework /core/env/Environment.html[`Environment`]
7066+ The {api-spring-framework} /core/env/Environment.html[`Environment`]
70677067is an abstraction integrated in the container that models two key
70687068aspects of the application environment: <<beans-definition-profiles,_profiles_>>
70697069and <<beans-property-source-abstraction,_properties_>>.
@@ -7145,7 +7145,7 @@ this need.
71457145[[beans-definition-profiles-java]]
71467146==== @Profile
71477147
7148- The {javadoc-baseurl}/org/springframework /context/annotation/Profile.html[`@Profile`]
7148+ The {api-spring-framework} /context/annotation/Profile.html[`@Profile`]
71497149annotation allows you to indicate that a component is eligible for registration
71507150when one or more specified profiles are active. Using our example above, we
71517151can rewrite the `dataSource` configuration as follows:
@@ -7397,21 +7397,21 @@ System.out.println("Does my environment contain the ''foo'' property? " + contai
73977397
73987398In the snippet above, we see a high-level way of asking Spring whether the `foo` property is
73997399defined for the current environment. To answer this question, the `Environment` object performs
7400- a search over a set of {javadoc-baseurl}/org/springframework /core/env/PropertySource.html[`PropertySource`]
7400+ a search over a set of {api-spring-framework} /core/env/PropertySource.html[`PropertySource`]
74017401objects. A `PropertySource` is a simple abstraction over any source of key-value pairs, and
7402- Spring's {javadoc-baseurl}/org/springframework /core/env/StandardEnvironment.html[`StandardEnvironment`]
7402+ Spring's {api-spring-framework} /core/env/StandardEnvironment.html[`StandardEnvironment`]
74037403is configured with two PropertySource objects -- one representing the set of JVM system properties
74047404(_a la_ `System.getProperties()`) and one representing the set of system environment variables
74057405(_a la_ `System.getenv()`).
74067406
74077407[NOTE]
74087408====
74097409These default property sources are present for `StandardEnvironment`, for use in standalone
7410- applications. {javadoc-baseurl}/org/springframework /web/context/support/StandardServletEnvironment.html[`StandardServletEnvironment`]
7410+ applications. {api-spring-framework} /web/context/support/StandardServletEnvironment.html[`StandardServletEnvironment`]
74117411is populated with additional default property sources including servlet config and servlet
7412- context parameters. {javadoc-baseurl}/org/springframework /web/portlet/context/StandardPortletEnvironment.html[`StandardPortletEnvironment`]
7412+ context parameters. {api-spring-framework} /web/portlet/context/StandardPortletEnvironment.html[`StandardPortletEnvironment`]
74137413similarly has access to portlet config and portlet context parameters as property sources.
7414- Both can optionally enable a {javadoc-baseurl}/org/springframework /jndi/JndiPropertySource.html[`JndiPropertySource`].
7414+ Both can optionally enable a {api-spring-framework} /jndi/JndiPropertySource.html[`JndiPropertySource`].
74157415See Javadoc for details.
74167416====
74177417
@@ -7443,13 +7443,13 @@ sources.addFirst(new MyPropertySource());
74437443In the code above, `MyPropertySource` has been added with highest precedence in the
74447444search. If it contains a `foo` property, it will be detected and returned ahead of
74457445any `foo` property in any other `PropertySource`. The
7446- {javadoc-baseurl}/org/springframework /core/env/MutablePropertySources.html[`MutablePropertySources`]
7446+ {api-spring-framework} /core/env/MutablePropertySources.html[`MutablePropertySources`]
74477447API exposes a number of methods that allow for precise manipulation of the set of
74487448property sources.
74497449
74507450=== @PropertySource
74517451
7452- The {javadoc-baseurl}/org/springframework /context/annotation/PropertySource.html[`@PropertySource`]
7452+ The {api-spring-framework} /context/annotation/PropertySource.html[`@PropertySource`]
74537453annotation provides a convenient and declarative mechanism for adding a `PropertySource`
74547454to Spring's `Environment`.
74557455
@@ -7571,7 +7571,7 @@ AspectJ load-time weaving, see <<aop-aj-ltw>>.
75717571As was discussed in the chapter introduction, the `org.springframework.beans.factory`
75727572package provides basic functionality for managing and manipulating beans, including in a
75737573programmatic way. The `org.springframework.context` package adds the
7574- {javadoc-baseurl}/org/springframework /context/ApplicationContext.html[`ApplicationContext`]
7574+ {api-spring-framework} /context/ApplicationContext.html[`ApplicationContext`]
75757575interface, which extends the `BeanFactory` interface, in addition to extending other
75767576interfaces to provide additional functionality in a more __application
75777577framework-oriented style__. Many people use the `ApplicationContext` in a completely
@@ -8249,7 +8249,7 @@ and JMX support facilities. Application components can also interact with the
82498249application server's JCA WorkManager through Spring's `TaskExecutor` abstraction.
82508250
82518251Check out the JavaDoc of the
8252- {javadoc-baseurl}/org/springframework /jca/context/SpringContextResourceAdapter.html[`SpringContextResourceAdapter`]
8252+ {api-spring-framework} /jca/context/SpringContextResourceAdapter.html[`SpringContextResourceAdapter`]
82538253class for the configuration details involved in RAR deployment.
82548254
82558255__For a simple deployment of a Spring ApplicationContext as a Java EE RAR file:__ package
@@ -8402,7 +8402,7 @@ option for accessing shared Spring-managed components, such as in an EJB 2.1
84028402environment, or when you want to share a single ApplicationContext as a parent to
84038403WebApplicationContexts across WAR files. In this case you should look into using the
84048404utility class
8405- {javadoc-baseurl}/org/springframework /context/access/ContextSingletonBeanFactoryLocator.html[`ContextSingletonBeanFactoryLocator`]
8405+ {api-spring-framework} /context/access/ContextSingletonBeanFactoryLocator.html[`ContextSingletonBeanFactoryLocator`]
84068406locator that is described in this
84078407https://spring.io/blog/2007/06/11/using-a-shared-parent-application-context-in-a-multi-war-spring-application/[Spring
84088408team blog entry].
0 commit comments