@@ -370,7 +370,7 @@ delegates, e.g. with `XmlBeanDefinitionReader` for XML files:
370
370
----
371
371
GenericApplicationContext context = new GenericApplicationContext();
372
372
new XmlBeanDefinitionReader(context).loadBeanDefinitions("services.xml", "daos.xml");
373
- context.refresh();
373
+ context.refresh();
374
374
----
375
375
376
376
Or with `GroovyBeanDefinitionReader` for Groovy files:
@@ -380,7 +380,7 @@ Or with `GroovyBeanDefinitionReader` for Groovy files:
380
380
----
381
381
GenericApplicationContext context = new GenericApplicationContext();
382
382
new GroovyBeanDefinitionReader(context).loadBeanDefinitions("services.groovy", "daos.groovy");
383
- context.refresh();
383
+ context.refresh();
384
384
----
385
385
386
386
Such reader delegates can be mixed and matched on the same `ApplicationContext`,
@@ -1682,7 +1682,7 @@ The preceding example is equivalent to the following Java code:
1682
1682
[source,java,indent=0]
1683
1683
[subs="verbatim,quotes"]
1684
1684
----
1685
- exampleBean.setEmail("")
1685
+ exampleBean.setEmail("");
1686
1686
----
1687
1687
1688
1688
The `<null/>` element handles `null` values. For example:
@@ -1702,7 +1702,7 @@ The above configuration is equivalent to the following Java code:
1702
1702
[source,java,indent=0]
1703
1703
[subs="verbatim,quotes"]
1704
1704
----
1705
- exampleBean.setEmail(null)
1705
+ exampleBean.setEmail(null);
1706
1706
----
1707
1707
1708
1708
@@ -3853,7 +3853,6 @@ Find below the custom `BeanPostProcessor` implementation class definition:
3853
3853
package scripting;
3854
3854
3855
3855
import org.springframework.beans.factory.config.BeanPostProcessor;
3856
- import org.springframework.beans.BeansException;
3857
3856
3858
3857
public class InstantiationTracingBeanPostProcessor implements BeanPostProcessor {
3859
3858
@@ -5261,6 +5260,7 @@ For details about the effects of combining various lifecycle mechanisms, see
5261
5260
5262
5261
[[beans-classpath-scanning]]
5263
5262
== Classpath scanning and managed components
5263
+
5264
5264
Most examples in this chapter use XML to specify the configuration metadata that produces
5265
5265
each `BeanDefinition` within the Spring container. The previous section
5266
5266
(<<beans-annotation-config>>) demonstrates how to provide a lot of the configuration
@@ -5427,7 +5427,7 @@ comma/semicolon/space-separated list that includes the parent package of each cl
5427
5427
@Configuration
5428
5428
@ComponentScan(basePackages = "org.example")
5429
5429
public class AppConfig {
5430
- ...
5430
+ ...
5431
5431
}
5432
5432
----
5433
5433
@@ -5532,12 +5532,12 @@ and using "stub" repositories instead.
5532
5532
[subs="verbatim,quotes"]
5533
5533
----
5534
5534
@Configuration
5535
- @ComponentScan(basePackages = "org.example",
5536
- includeFilters = @Filter(type = FilterType.REGEX, pattern = ".*Stub.*Repository"),
5537
- excludeFilters = @Filter(Repository.class))
5538
- public class AppConfig {
5539
- ...
5540
- }
5535
+ @ComponentScan(basePackages = "org.example",
5536
+ includeFilters = @Filter(type = FilterType.REGEX, pattern = ".*Stub.*Repository"),
5537
+ excludeFilters = @Filter(Repository.class))
5538
+ public class AppConfig {
5539
+ ...
5540
+ }
5541
5541
----
5542
5542
5543
5543
and the equivalent using XML
@@ -5767,10 +5767,10 @@ fully-qualified class name when configuring the scanner:
5767
5767
[subs="verbatim,quotes"]
5768
5768
----
5769
5769
@Configuration
5770
- @ComponentScan(basePackages = "org.example", nameGenerator = MyNameGenerator.class)
5771
- public class AppConfig {
5772
- ...
5773
- }
5770
+ @ComponentScan(basePackages = "org.example", nameGenerator = MyNameGenerator.class)
5771
+ public class AppConfig {
5772
+ ...
5773
+ }
5774
5774
----
5775
5775
5776
5776
[source,xml,indent=0]
@@ -5824,8 +5824,8 @@ fully-qualified class name when configuring the scanner:
5824
5824
@Configuration
5825
5825
@ComponentScan(basePackages = "org.example", scopeResolver = MyScopeResolver.class)
5826
5826
public class AppConfig {
5827
- ...
5828
- }
5827
+ ...
5828
+ }
5829
5829
----
5830
5830
5831
5831
[source,xml,indent=0]
@@ -5849,8 +5849,8 @@ the following configuration will result in standard JDK dynamic proxies:
5849
5849
@Configuration
5850
5850
@ComponentScan(basePackages = "org.example", scopedProxy = ScopedProxyMode.INTERFACES)
5851
5851
public class AppConfig {
5852
- ...
5853
- }
5852
+ ...
5853
+ }
5854
5854
----
5855
5855
5856
5856
[source,xml,indent=0]
@@ -6108,7 +6108,7 @@ exact same way as when using Spring annotations:
6108
6108
@Configuration
6109
6109
@ComponentScan(basePackages = "org.example")
6110
6110
public class AppConfig {
6111
- ...
6111
+ ...
6112
6112
}
6113
6113
----
6114
6114
@@ -6338,7 +6338,7 @@ To enable component scanning, just annotate your `@Configuration` class as follo
6338
6338
@Configuration
6339
6339
@ComponentScan(basePackages = "com.acme")
6340
6340
public class AppConfig {
6341
- ...
6341
+ ...
6342
6342
}
6343
6343
----
6344
6344
@@ -6657,7 +6657,7 @@ method directly during construction:
6657
6657
public Foo foo() {
6658
6658
Foo foo = new Foo();
6659
6659
foo.init();
6660
- return foo;
6660
+ return foo;
6661
6661
}
6662
6662
6663
6663
// ...
@@ -6975,7 +6975,7 @@ another configuration class:
6975
6975
@Configuration
6976
6976
public class ConfigA {
6977
6977
6978
- @Bean
6978
+ @Bean
6979
6979
public A a() {
6980
6980
return new A();
6981
6981
}
@@ -8645,18 +8645,18 @@ environment provides:
8645
8645
[subs="verbatim,quotes"]
8646
8646
----
8647
8647
public class EntityCreatedEvent<T>
8648
- extends ApplicationEvent implements ResolvableTypeProvider {
8648
+ extends ApplicationEvent implements ResolvableTypeProvider {
8649
8649
8650
- public EntityCreatedEvent(T entity) {
8651
- super(entity);
8652
- }
8650
+ public EntityCreatedEvent(T entity) {
8651
+ super(entity);
8652
+ }
8653
8653
8654
- @Override
8655
- public ResolvableType getResolvableType() {
8656
- return ResolvableType.forClassWithGenerics(getClass(),
8657
- ResolvableType.forInstance(getSource()));
8658
- }
8659
- }
8654
+ @Override
8655
+ public ResolvableType getResolvableType() {
8656
+ return ResolvableType.forClassWithGenerics(getClass(),
8657
+ ResolvableType.forInstance(getSource()));
8658
+ }
8659
+ }
8660
8660
----
8661
8661
8662
8662
[TIP]
0 commit comments