@@ -2806,7 +2806,7 @@ to do so:
2806
2806
[source,java,indent=0]
2807
2807
[subs="verbatim,quotes"]
2808
2808
----
2809
- ** @RequestScope**
2809
+ @RequestScope
2810
2810
@Component
2811
2811
public class LoginAction {
2812
2812
// ...
@@ -2846,7 +2846,7 @@ When using annotation-driven components or Java configuration, you can use the
2846
2846
[source,java,indent=0]
2847
2847
[subs="verbatim,quotes"]
2848
2848
----
2849
- ** @SessionScope**
2849
+ @SessionScope
2850
2850
@Component
2851
2851
public class UserPreferences {
2852
2852
// ...
@@ -2885,7 +2885,7 @@ following example shows how to do so:
2885
2885
[source,java,indent=0]
2886
2886
[subs="verbatim,quotes"]
2887
2887
----
2888
- ** @ApplicationScope**
2888
+ @ApplicationScope
2889
2889
@Component
2890
2890
public class AppPreferences {
2891
2891
// ...
@@ -4893,7 +4893,7 @@ primary `MovieCatalog`:
4893
4893
public class MovieConfiguration {
4894
4894
4895
4895
@Bean
4896
- ** @Primary**
4896
+ @Primary
4897
4897
public MovieCatalog firstMovieCatalog() { ... }
4898
4898
4899
4899
@Bean
@@ -4938,7 +4938,7 @@ The corresponding bean definitions follow:
4938
4938
4939
4939
<context:annotation-config/>
4940
4940
4941
- <bean class="example.SimpleMovieCatalog" ** primary="true"** >
4941
+ <bean class="example.SimpleMovieCatalog" primary="true">
4942
4942
<!-- inject any dependencies required by this bean -->
4943
4943
</bean>
4944
4944
@@ -4971,7 +4971,7 @@ shown in the following example:
4971
4971
public class MovieRecommender {
4972
4972
4973
4973
@Autowired
4974
- ** @Qualifier("main")**
4974
+ @Qualifier("main")
4975
4975
private MovieCatalog movieCatalog;
4976
4976
4977
4977
// ...
@@ -4993,7 +4993,7 @@ method parameters, as shown in the following example:
4993
4993
private CustomerPreferenceDao customerPreferenceDao;
4994
4994
4995
4995
@Autowired
4996
- public void prepare(** @Qualifier("main")** MovieCatalog movieCatalog,
4996
+ public void prepare(@Qualifier("main") MovieCatalog movieCatalog,
4997
4997
CustomerPreferenceDao customerPreferenceDao) {
4998
4998
this.movieCatalog = movieCatalog;
4999
4999
this.customerPreferenceDao = customerPreferenceDao;
@@ -5113,7 +5113,7 @@ provide the `@Qualifier` annotation within your definition, as the following exa
5113
5113
----
5114
5114
@Target({ElementType.FIELD, ElementType.PARAMETER})
5115
5115
@Retention(RetentionPolicy.RUNTIME)
5116
- ** @Qualifier**
5116
+ @Qualifier
5117
5117
public @interface Genre {
5118
5118
5119
5119
String value();
@@ -5131,13 +5131,13 @@ following example shows:
5131
5131
public class MovieRecommender {
5132
5132
5133
5133
@Autowired
5134
- ** @Genre("Action")**
5134
+ @Genre("Action")
5135
5135
private MovieCatalog actionCatalog;
5136
5136
5137
5137
private MovieCatalog comedyCatalog;
5138
5138
5139
5139
@Autowired
5140
- public void setComedyCatalog(** @Genre("Comedy")** MovieCatalog comedyCatalog) {
5140
+ public void setComedyCatalog(@Genre("Comedy") MovieCatalog comedyCatalog) {
5141
5141
this.comedyCatalog = comedyCatalog;
5142
5142
}
5143
5143
@@ -5169,12 +5169,12 @@ demonstrates both approaches:
5169
5169
<context:annotation-config/>
5170
5170
5171
5171
<bean class="example.SimpleMovieCatalog">
5172
- ** <qualifier type="Genre" value="Action"/>**
5172
+ <qualifier type="Genre" value="Action"/>
5173
5173
<!-- inject any dependencies required by this bean -->
5174
5174
</bean>
5175
5175
5176
5176
<bean class="example.SimpleMovieCatalog">
5177
- ** <qualifier type="example.Genre" value="Comedy"/>**
5177
+ <qualifier type="example.Genre" value="Comedy"/>
5178
5178
<!-- inject any dependencies required by this bean -->
5179
5179
</bean>
5180
5180
@@ -5496,7 +5496,7 @@ named `movieFinder` injected into its setter method:
5496
5496
5497
5497
private MovieFinder movieFinder;
5498
5498
5499
- ** @Resource**
5499
+ @Resource
5500
5500
public void setMovieFinder(MovieFinder movieFinder) {
5501
5501
this.movieFinder = movieFinder;
5502
5502
}
@@ -5705,7 +5705,7 @@ You can then use `@SessionScope` without declaring the `proxyMode` as follows:
5705
5705
[subs="verbatim,quotes"]
5706
5706
----
5707
5707
@Service
5708
- ** @SessionScope**
5708
+ @SessionScope
5709
5709
public class SessionScopedService {
5710
5710
// ...
5711
5711
}
@@ -5719,7 +5719,7 @@ You can also override the value for the `proxyMode`, as the following example sh
5719
5719
[subs="verbatim,quotes"]
5720
5720
----
5721
5721
@Service
5722
- ** @SessionScope(proxyMode = ScopedProxyMode.INTERFACES)**
5722
+ @SessionScope(proxyMode = ScopedProxyMode.INTERFACES)
5723
5723
public class SessionScopedUserService implements UserService {
5724
5724
// ...
5725
5725
}
@@ -6248,7 +6248,7 @@ technique:
6248
6248
[subs="verbatim,quotes"]
6249
6249
----
6250
6250
@Component
6251
- ** @Qualifier("Action")**
6251
+ @Qualifier("Action")
6252
6252
public class ActionMovieCatalog implements MovieCatalog {
6253
6253
// ...
6254
6254
}
@@ -6258,7 +6258,7 @@ technique:
6258
6258
[subs="verbatim,quotes"]
6259
6259
----
6260
6260
@Component
6261
- ** @Genre("Action")**
6261
+ @Genre("Action")
6262
6262
public class ActionMovieCatalog implements MovieCatalog {
6263
6263
// ...
6264
6264
}
@@ -6268,7 +6268,7 @@ technique:
6268
6268
[subs="verbatim,quotes"]
6269
6269
----
6270
6270
@Component
6271
- ** @Offline**
6271
+ @Offline
6272
6272
public class CachingMovieCatalog implements MovieCatalog {
6273
6273
// ...
6274
6274
}
@@ -7189,7 +7189,7 @@ as the following example shows:
7189
7189
public class MyConfiguration {
7190
7190
7191
7191
@Bean
7192
- ** @Scope("prototype")**
7192
+ @Scope("prototype")
7193
7193
public Encryptor encryptor() {
7194
7194
// ...
7195
7195
}
@@ -7217,7 +7217,7 @@ it resembles the following:
7217
7217
----
7218
7218
// an HTTP Session-scoped bean exposed as a proxy
7219
7219
@Bean
7220
- ** @SessionScope**
7220
+ @SessionScope
7221
7221
public UserPreferences userPreferences() {
7222
7222
return new UserPreferences();
7223
7223
}
@@ -7298,7 +7298,7 @@ annotation, as the following example shows:
7298
7298
public class AppConfig {
7299
7299
7300
7300
@Bean
7301
- ** @Description("Provides a basic example of a bean")**
7301
+ @Description("Provides a basic example of a bean")
7302
7302
public Thing thing() {
7303
7303
return new Thing();
7304
7304
}
@@ -8127,7 +8127,7 @@ can rewrite the `dataSource` configuration as follows:
8127
8127
[subs="verbatim,quotes"]
8128
8128
----
8129
8129
@Configuration
8130
- ** @Profile("development")**
8130
+ @Profile("development")
8131
8131
public class StandaloneDataConfig {
8132
8132
8133
8133
@Bean
@@ -8145,7 +8145,7 @@ can rewrite the `dataSource` configuration as follows:
8145
8145
[subs="verbatim,quotes"]
8146
8146
----
8147
8147
@Configuration
8148
- ** @Profile("production")**
8148
+ @Profile("production")
8149
8149
public class JndiDataConfig {
8150
8150
8151
8151
@Bean(destroyMethod="")
@@ -8186,7 +8186,7 @@ of creating a custom composed annotation. The following example defines a custom
8186
8186
----
8187
8187
@Target(ElementType.TYPE)
8188
8188
@Retention(RetentionPolicy.RUNTIME)
8189
- ** @Profile("production")**
8189
+ @Profile("production")
8190
8190
public @interface Production {
8191
8191
}
8192
8192
----
@@ -8423,7 +8423,7 @@ following example:
8423
8423
[subs="verbatim,quotes"]
8424
8424
----
8425
8425
@Configuration
8426
- ** @Profile("default")**
8426
+ @Profile("default")
8427
8427
public class DefaultDataConfig {
8428
8428
8429
8429
@Bean
@@ -8540,7 +8540,7 @@ a call to `testBean.getName()` returns `myTestBean`:
8540
8540
[subs="verbatim,quotes"]
8541
8541
----
8542
8542
@Configuration
8543
- ** @PropertySource("classpath:/com/myco/app.properties")**
8543
+ @PropertySource("classpath:/com/myco/app.properties")
8544
8544
public class AppConfig {
8545
8545
8546
8546
@Autowired
0 commit comments