@@ -2656,7 +2656,7 @@ to do so:
2656
2656
[source,java,indent=0]
2657
2657
[subs="verbatim,quotes"]
2658
2658
----
2659
- ** @RequestScope**
2659
+ @RequestScope
2660
2660
@Component
2661
2661
public class LoginAction {
2662
2662
// ...
@@ -2692,7 +2692,7 @@ When using annotation-driven components or Java configuration, you can use the
2692
2692
[source,java,indent=0]
2693
2693
[subs="verbatim,quotes"]
2694
2694
----
2695
- ** @SessionScope**
2695
+ @SessionScope
2696
2696
@Component
2697
2697
public class UserPreferences {
2698
2698
// ...
@@ -2727,7 +2727,7 @@ following example shows how to do so:
2727
2727
[source,java,indent=0]
2728
2728
[subs="verbatim,quotes"]
2729
2729
----
2730
- ** @ApplicationScope**
2730
+ @ApplicationScope
2731
2731
@Component
2732
2732
public class AppPreferences {
2733
2733
// ...
@@ -4615,7 +4615,7 @@ primary `MovieCatalog`:
4615
4615
public class MovieConfiguration {
4616
4616
4617
4617
@Bean
4618
- ** @Primary**
4618
+ @Primary
4619
4619
public MovieCatalog firstMovieCatalog() { ... }
4620
4620
4621
4621
@Bean
@@ -4656,7 +4656,7 @@ The corresponding bean definitions follow:
4656
4656
4657
4657
<context:annotation-config/>
4658
4658
4659
- <bean class="example.SimpleMovieCatalog" ** primary="true"** >
4659
+ <bean class="example.SimpleMovieCatalog" primary="true">
4660
4660
<!-- inject any dependencies required by this bean -->
4661
4661
</bean>
4662
4662
@@ -4687,7 +4687,7 @@ shown in the following example:
4687
4687
public class MovieRecommender {
4688
4688
4689
4689
@Autowired
4690
- ** @Qualifier("main")**
4690
+ @Qualifier("main")
4691
4691
private MovieCatalog movieCatalog;
4692
4692
4693
4693
// ...
@@ -4707,7 +4707,7 @@ method parameters, as shown in the following example:
4707
4707
private CustomerPreferenceDao customerPreferenceDao;
4708
4708
4709
4709
@Autowired
4710
- public void prepare(** @Qualifier("main")** MovieCatalog movieCatalog,
4710
+ public void prepare(@Qualifier("main") MovieCatalog movieCatalog,
4711
4711
CustomerPreferenceDao customerPreferenceDao) {
4712
4712
this.movieCatalog = movieCatalog;
4713
4713
this.customerPreferenceDao = customerPreferenceDao;
@@ -4823,7 +4823,7 @@ provide the `@Qualifier` annotation within your definition, as the following exa
4823
4823
----
4824
4824
@Target({ElementType.FIELD, ElementType.PARAMETER})
4825
4825
@Retention(RetentionPolicy.RUNTIME)
4826
- ** @Qualifier**
4826
+ @Qualifier
4827
4827
public @interface Genre {
4828
4828
4829
4829
String value();
@@ -4839,13 +4839,13 @@ following example shows:
4839
4839
public class MovieRecommender {
4840
4840
4841
4841
@Autowired
4842
- ** @Genre("Action")**
4842
+ @Genre("Action")
4843
4843
private MovieCatalog actionCatalog;
4844
4844
4845
4845
private MovieCatalog comedyCatalog;
4846
4846
4847
4847
@Autowired
4848
- public void setComedyCatalog(** @Genre("Comedy")** MovieCatalog comedyCatalog) {
4848
+ public void setComedyCatalog(@Genre("Comedy") MovieCatalog comedyCatalog) {
4849
4849
this.comedyCatalog = comedyCatalog;
4850
4850
}
4851
4851
@@ -4875,12 +4875,12 @@ demonstrates both approaches:
4875
4875
<context:annotation-config/>
4876
4876
4877
4877
<bean class="example.SimpleMovieCatalog">
4878
- ** <qualifier type="Genre" value="Action"/>**
4878
+ <qualifier type="Genre" value="Action"/>
4879
4879
<!-- inject any dependencies required by this bean -->
4880
4880
</bean>
4881
4881
4882
4882
<bean class="example.SimpleMovieCatalog">
4883
- ** <qualifier type="example.Genre" value="Comedy"/>**
4883
+ <qualifier type="example.Genre" value="Comedy"/>
4884
4884
<!-- inject any dependencies required by this bean -->
4885
4885
</bean>
4886
4886
@@ -5179,7 +5179,7 @@ named `movieFinder` injected into its setter method:
5179
5179
5180
5180
private MovieFinder movieFinder;
5181
5181
5182
- ** @Resource**
5182
+ @Resource
5183
5183
public void setMovieFinder(MovieFinder movieFinder) {
5184
5184
this.movieFinder = movieFinder;
5185
5185
}
@@ -5381,7 +5381,7 @@ You can then use `@SessionScope` without declaring the `proxyMode` as follows:
5381
5381
[subs="verbatim,quotes"]
5382
5382
----
5383
5383
@Service
5384
- ** @SessionScope**
5384
+ @SessionScope
5385
5385
public class SessionScopedService {
5386
5386
// ...
5387
5387
}
@@ -5393,7 +5393,7 @@ You can also override the value for the `proxyMode`, as the following example sh
5393
5393
[subs="verbatim,quotes"]
5394
5394
----
5395
5395
@Service
5396
- ** @SessionScope(proxyMode = ScopedProxyMode.INTERFACES)**
5396
+ @SessionScope(proxyMode = ScopedProxyMode.INTERFACES)
5397
5397
public class SessionScopedUserService implements UserService {
5398
5398
// ...
5399
5399
}
@@ -5896,7 +5896,7 @@ technique:
5896
5896
[subs="verbatim,quotes"]
5897
5897
----
5898
5898
@Component
5899
- ** @Qualifier("Action")**
5899
+ @Qualifier("Action")
5900
5900
public class ActionMovieCatalog implements MovieCatalog {
5901
5901
// ...
5902
5902
}
@@ -5906,7 +5906,7 @@ technique:
5906
5906
[subs="verbatim,quotes"]
5907
5907
----
5908
5908
@Component
5909
- ** @Genre("Action")**
5909
+ @Genre("Action")
5910
5910
public class ActionMovieCatalog implements MovieCatalog {
5911
5911
// ...
5912
5912
}
@@ -5916,7 +5916,7 @@ technique:
5916
5916
[subs="verbatim,quotes"]
5917
5917
----
5918
5918
@Component
5919
- ** @Offline**
5919
+ @Offline
5920
5920
public class CachingMovieCatalog implements MovieCatalog {
5921
5921
// ...
5922
5922
}
@@ -6782,7 +6782,7 @@ as the following example shows:
6782
6782
public class MyConfiguration {
6783
6783
6784
6784
@Bean
6785
- ** @Scope("prototype")**
6785
+ @Scope("prototype")
6786
6786
public Encryptor encryptor() {
6787
6787
// ...
6788
6788
}
@@ -6808,7 +6808,7 @@ it resembles the following:
6808
6808
----
6809
6809
// an HTTP Session-scoped bean exposed as a proxy
6810
6810
@Bean
6811
- ** @SessionScope**
6811
+ @SessionScope
6812
6812
public UserPreferences userPreferences() {
6813
6813
return new UserPreferences();
6814
6814
}
@@ -6883,7 +6883,7 @@ annotation, as the following example shows:
6883
6883
public class AppConfig {
6884
6884
6885
6885
@Bean
6886
- ** @Description("Provides a basic example of a bean")**
6886
+ @Description("Provides a basic example of a bean")
6887
6887
public Thing thing() {
6888
6888
return new Thing();
6889
6889
}
@@ -7674,7 +7674,7 @@ can rewrite the `dataSource` configuration as follows:
7674
7674
[subs="verbatim,quotes"]
7675
7675
----
7676
7676
@Configuration
7677
- ** @Profile("development")**
7677
+ @Profile("development")
7678
7678
public class StandaloneDataConfig {
7679
7679
7680
7680
@Bean
@@ -7692,7 +7692,7 @@ can rewrite the `dataSource` configuration as follows:
7692
7692
[subs="verbatim,quotes"]
7693
7693
----
7694
7694
@Configuration
7695
- ** @Profile("production")**
7695
+ @Profile("production")
7696
7696
public class JndiDataConfig {
7697
7697
7698
7698
@Bean(destroyMethod="")
@@ -7731,7 +7731,7 @@ of creating a custom composed annotation. The following example defines a custom
7731
7731
----
7732
7732
@Target(ElementType.TYPE)
7733
7733
@Retention(RetentionPolicy.RUNTIME)
7734
- ** @Profile("production")**
7734
+ @Profile("production")
7735
7735
public @interface Production {
7736
7736
}
7737
7737
----
@@ -7952,7 +7952,7 @@ following example:
7952
7952
[subs="verbatim,quotes"]
7953
7953
----
7954
7954
@Configuration
7955
- ** @Profile("default")**
7955
+ @Profile("default")
7956
7956
public class DefaultDataConfig {
7957
7957
7958
7958
@Bean
@@ -8063,7 +8063,7 @@ a call to `testBean.getName()` returns `myTestBean`:
8063
8063
[subs="verbatim,quotes"]
8064
8064
----
8065
8065
@Configuration
8066
- ** @PropertySource("classpath:/com/myco/app.properties")**
8066
+ @PropertySource("classpath:/com/myco/app.properties")
8067
8067
public class AppConfig {
8068
8068
8069
8069
@Autowired
0 commit comments