Skip to content

Commit f9e22a0

Browse files
committed
Merge branch '5.1.x'
2 parents 4bee507 + 8f7b118 commit f9e22a0

13 files changed

+81
-83
lines changed

src/docs/asciidoc/core/core-aop.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1692,14 +1692,14 @@ you can use the `and`, `or`, and `not` keywords in place of `&&`, `||`, and `!`,
16921692
respectively. For example, the previous pointcut can be better written as follows:
16931693

16941694
[source,xml,indent=0]
1695-
[subs="verbatim,quotes"]
1695+
[subs="verbatim"]
16961696
----
16971697
<aop:config>
16981698
16991699
<aop:aspect id="myAspect" ref="aBean">
17001700
17011701
<aop:pointcut id="businessService"
1702-
expression="execution(* com.xyz.myapp.service.*.*(..)) **and** this(service)"/>
1702+
expression="execution(* com.xyz.myapp.service.*.*(..)) and this(service)"/>
17031703
17041704
<aop:before pointcut-ref="businessService" method="monitor"/>
17051705
@@ -3122,7 +3122,7 @@ the following example:
31223122
class="foo.StubEntitlementCalculationService"/>
31233123
31243124
<!-- this switches on the load-time weaving -->
3125-
**<context:load-time-weaver/>**
3125+
<context:load-time-weaver/>
31263126
</beans>
31273127
----
31283128

src/docs/asciidoc/core/core-appendix.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ use the `NamespaceHandlerSupport` class:
810810
public class MyNamespaceHandler extends NamespaceHandlerSupport {
811811
812812
public void init() {
813-
**registerBeanDefinitionParser("dateformat", new SimpleDateFormatBeanDefinitionParser());**
813+
registerBeanDefinitionParser("dateformat", new SimpleDateFormatBeanDefinitionParser());
814814
}
815815
816816
}

src/docs/asciidoc/core/core-beans.adoc

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2656,7 +2656,7 @@ to do so:
26562656
[source,java,indent=0]
26572657
[subs="verbatim,quotes"]
26582658
----
2659-
**@RequestScope**
2659+
@RequestScope
26602660
@Component
26612661
public class LoginAction {
26622662
// ...
@@ -2692,7 +2692,7 @@ When using annotation-driven components or Java configuration, you can use the
26922692
[source,java,indent=0]
26932693
[subs="verbatim,quotes"]
26942694
----
2695-
**@SessionScope**
2695+
@SessionScope
26962696
@Component
26972697
public class UserPreferences {
26982698
// ...
@@ -2727,7 +2727,7 @@ following example shows how to do so:
27272727
[source,java,indent=0]
27282728
[subs="verbatim,quotes"]
27292729
----
2730-
**@ApplicationScope**
2730+
@ApplicationScope
27312731
@Component
27322732
public class AppPreferences {
27332733
// ...
@@ -4615,7 +4615,7 @@ primary `MovieCatalog`:
46154615
public class MovieConfiguration {
46164616
46174617
@Bean
4618-
**@Primary**
4618+
@Primary
46194619
public MovieCatalog firstMovieCatalog() { ... }
46204620
46214621
@Bean
@@ -4656,7 +4656,7 @@ The corresponding bean definitions follow:
46564656
46574657
<context:annotation-config/>
46584658
4659-
<bean class="example.SimpleMovieCatalog" **primary="true"**>
4659+
<bean class="example.SimpleMovieCatalog" primary="true">
46604660
<!-- inject any dependencies required by this bean -->
46614661
</bean>
46624662
@@ -4687,7 +4687,7 @@ shown in the following example:
46874687
public class MovieRecommender {
46884688
46894689
@Autowired
4690-
**@Qualifier("main")**
4690+
@Qualifier("main")
46914691
private MovieCatalog movieCatalog;
46924692
46934693
// ...
@@ -4707,7 +4707,7 @@ method parameters, as shown in the following example:
47074707
private CustomerPreferenceDao customerPreferenceDao;
47084708
47094709
@Autowired
4710-
public void prepare(**@Qualifier("main")**MovieCatalog movieCatalog,
4710+
public void prepare(@Qualifier("main") MovieCatalog movieCatalog,
47114711
CustomerPreferenceDao customerPreferenceDao) {
47124712
this.movieCatalog = movieCatalog;
47134713
this.customerPreferenceDao = customerPreferenceDao;
@@ -4823,7 +4823,7 @@ provide the `@Qualifier` annotation within your definition, as the following exa
48234823
----
48244824
@Target({ElementType.FIELD, ElementType.PARAMETER})
48254825
@Retention(RetentionPolicy.RUNTIME)
4826-
**@Qualifier**
4826+
@Qualifier
48274827
public @interface Genre {
48284828
48294829
String value();
@@ -4839,13 +4839,13 @@ following example shows:
48394839
public class MovieRecommender {
48404840
48414841
@Autowired
4842-
**@Genre("Action")**
4842+
@Genre("Action")
48434843
private MovieCatalog actionCatalog;
48444844
48454845
private MovieCatalog comedyCatalog;
48464846
48474847
@Autowired
4848-
public void setComedyCatalog(**@Genre("Comedy")** MovieCatalog comedyCatalog) {
4848+
public void setComedyCatalog(@Genre("Comedy") MovieCatalog comedyCatalog) {
48494849
this.comedyCatalog = comedyCatalog;
48504850
}
48514851
@@ -4875,12 +4875,12 @@ demonstrates both approaches:
48754875
<context:annotation-config/>
48764876
48774877
<bean class="example.SimpleMovieCatalog">
4878-
**<qualifier type="Genre" value="Action"/>**
4878+
<qualifier type="Genre" value="Action"/>
48794879
<!-- inject any dependencies required by this bean -->
48804880
</bean>
48814881
48824882
<bean class="example.SimpleMovieCatalog">
4883-
**<qualifier type="example.Genre" value="Comedy"/>**
4883+
<qualifier type="example.Genre" value="Comedy"/>
48844884
<!-- inject any dependencies required by this bean -->
48854885
</bean>
48864886
@@ -5179,7 +5179,7 @@ named `movieFinder` injected into its setter method:
51795179
51805180
private MovieFinder movieFinder;
51815181
5182-
**@Resource**
5182+
@Resource
51835183
public void setMovieFinder(MovieFinder movieFinder) {
51845184
this.movieFinder = movieFinder;
51855185
}
@@ -5381,7 +5381,7 @@ You can then use `@SessionScope` without declaring the `proxyMode` as follows:
53815381
[subs="verbatim,quotes"]
53825382
----
53835383
@Service
5384-
**@SessionScope**
5384+
@SessionScope
53855385
public class SessionScopedService {
53865386
// ...
53875387
}
@@ -5393,7 +5393,7 @@ You can also override the value for the `proxyMode`, as the following example sh
53935393
[subs="verbatim,quotes"]
53945394
----
53955395
@Service
5396-
**@SessionScope(proxyMode = ScopedProxyMode.INTERFACES)**
5396+
@SessionScope(proxyMode = ScopedProxyMode.INTERFACES)
53975397
public class SessionScopedUserService implements UserService {
53985398
// ...
53995399
}
@@ -5896,7 +5896,7 @@ technique:
58965896
[subs="verbatim,quotes"]
58975897
----
58985898
@Component
5899-
**@Qualifier("Action")**
5899+
@Qualifier("Action")
59005900
public class ActionMovieCatalog implements MovieCatalog {
59015901
// ...
59025902
}
@@ -5906,7 +5906,7 @@ technique:
59065906
[subs="verbatim,quotes"]
59075907
----
59085908
@Component
5909-
**@Genre("Action")**
5909+
@Genre("Action")
59105910
public class ActionMovieCatalog implements MovieCatalog {
59115911
// ...
59125912
}
@@ -5916,7 +5916,7 @@ technique:
59165916
[subs="verbatim,quotes"]
59175917
----
59185918
@Component
5919-
**@Offline**
5919+
@Offline
59205920
public class CachingMovieCatalog implements MovieCatalog {
59215921
// ...
59225922
}
@@ -6782,7 +6782,7 @@ as the following example shows:
67826782
public class MyConfiguration {
67836783
67846784
@Bean
6785-
**@Scope("prototype")**
6785+
@Scope("prototype")
67866786
public Encryptor encryptor() {
67876787
// ...
67886788
}
@@ -6808,7 +6808,7 @@ it resembles the following:
68086808
----
68096809
// an HTTP Session-scoped bean exposed as a proxy
68106810
@Bean
6811-
**@SessionScope**
6811+
@SessionScope
68126812
public UserPreferences userPreferences() {
68136813
return new UserPreferences();
68146814
}
@@ -6883,7 +6883,7 @@ annotation, as the following example shows:
68836883
public class AppConfig {
68846884
68856885
@Bean
6886-
**@Description("Provides a basic example of a bean")**
6886+
@Description("Provides a basic example of a bean")
68876887
public Thing thing() {
68886888
return new Thing();
68896889
}
@@ -7674,7 +7674,7 @@ can rewrite the `dataSource` configuration as follows:
76747674
[subs="verbatim,quotes"]
76757675
----
76767676
@Configuration
7677-
**@Profile("development")**
7677+
@Profile("development")
76787678
public class StandaloneDataConfig {
76797679
76807680
@Bean
@@ -7692,7 +7692,7 @@ can rewrite the `dataSource` configuration as follows:
76927692
[subs="verbatim,quotes"]
76937693
----
76947694
@Configuration
7695-
**@Profile("production")**
7695+
@Profile("production")
76967696
public class JndiDataConfig {
76977697
76987698
@Bean(destroyMethod="")
@@ -7731,7 +7731,7 @@ of creating a custom composed annotation. The following example defines a custom
77317731
----
77327732
@Target(ElementType.TYPE)
77337733
@Retention(RetentionPolicy.RUNTIME)
7734-
**@Profile("production")**
7734+
@Profile("production")
77357735
public @interface Production {
77367736
}
77377737
----
@@ -7952,7 +7952,7 @@ following example:
79527952
[subs="verbatim,quotes"]
79537953
----
79547954
@Configuration
7955-
**@Profile("default")**
7955+
@Profile("default")
79567956
public class DefaultDataConfig {
79577957
79587958
@Bean
@@ -8063,7 +8063,7 @@ a call to `testBean.getName()` returns `myTestBean`:
80638063
[subs="verbatim,quotes"]
80648064
----
80658065
@Configuration
8066-
**@PropertySource("classpath:/com/myco/app.properties")**
8066+
@PropertySource("classpath:/com/myco/app.properties")
80678067
public class AppConfig {
80688068
80698069
@Autowired

src/docs/asciidoc/core/core-validation.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ implementation of an `initBinder(..)` method:
678678
679679
protected void initBinder(HttpServletRequest request,
680680
ServletRequestDataBinder binder) throws Exception {
681-
**this.customPropertyEditorRegistrar.registerCustomEditors(binder);**
681+
this.customPropertyEditorRegistrar.registerCustomEditors(binder);
682682
}
683683
684684
// other methods to do with registering a User

src/docs/asciidoc/data-access.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@ Consider the following class definition:
10391039
[subs="verbatim,quotes"]
10401040
----
10411041
// the service class that we want to make transactional
1042-
**@Transactional**
1042+
@Transactional
10431043
public class DefaultFooService implements FooService {
10441044
10451045
Foo getFoo(String fooName);
@@ -1502,7 +1502,7 @@ The following code shows the simple profiling aspect discussed earlier:
15021502
this.order = order;
15031503
}
15041504
1505-
// this method *is* the around advice
1505+
// this method is the around advice
15061506
public Object profile(ProceedingJoinPoint call) throws Throwable {
15071507
Object returnValue;
15081508
StopWatch clock = new StopWatch(getClass().getName());
@@ -1757,7 +1757,7 @@ with an anonymous class, as follows:
17571757
[source,java,indent=0]
17581758
[subs="verbatim,quotes"]
17591759
----
1760-
transactionTemplate.execute(new **TransactionCallbackWithoutResult**() {
1760+
transactionTemplate.execute(new TransactionCallbackWithoutResult() {
17611761
protected void doInTransactionWithoutResult(TransactionStatus status) {
17621762
updateOperation1();
17631763
updateOperation2();
@@ -1778,7 +1778,7 @@ Code within the callback can roll the transaction back by calling the
17781778
updateOperation1();
17791779
updateOperation2();
17801780
} catch (SomeBusinessException ex) {
1781-
**status.setRollbackOnly();**
1781+
status.setRollbackOnly();
17821782
}
17831783
}
17841784
});
@@ -2505,7 +2505,7 @@ the setter for the `DataSource`. This leads to DAOs that resemble the following:
25052505
private JdbcTemplate jdbcTemplate;
25062506
25072507
public void setDataSource(DataSource dataSource) {
2508-
**this.jdbcTemplate = new JdbcTemplate(dataSource);**
2508+
this.jdbcTemplate = new JdbcTemplate(dataSource);
25092509
}
25102510
25112511
// JDBC-backed implementations of the methods on the CorporateEventDao follow...
@@ -4828,7 +4828,7 @@ errors in the SQL it executes from the scripts, as the following example shows:
48284828
[source,xml,indent=0]
48294829
[subs="verbatim,quotes"]
48304830
----
4831-
<jdbc:initialize-database data-source="dataSource" **ignore-failures="DROPS"**>
4831+
<jdbc:initialize-database data-source="dataSource" ignore-failures="DROPS">
48324832
<jdbc:script location="..."/>
48334833
</jdbc:initialize-database>
48344834
----

src/docs/asciidoc/integration-appendix.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ The following example shows how to use JNDI to look up a data source without the
4444
[source,xml,indent=0]
4545
[subs="verbatim,quotes"]
4646
----
47-
<bean id="**dataSource**" class="org.springframework.jndi.JndiObjectFactoryBean">
47+
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
4848
<property name="jndiName" value="jdbc/MyDataSource"/>
4949
</bean>
5050
<bean id="userDao" class="com.foo.JdbcUserDao">
5151
<!-- Spring will do the cast automatically (as usual) -->
52-
<property name="dataSource" ref="**dataSource**"/>
52+
<property name="dataSource" ref="dataSource"/>
5353
</bean>
5454
----
5555

@@ -59,11 +59,11 @@ schema:
5959
[source,xml,indent=0]
6060
[subs="verbatim,quotes"]
6161
----
62-
<jee:jndi-lookup id="**dataSource**" jndi-name="jdbc/MyDataSource"/>
62+
<jee:jndi-lookup id="dataSource" jndi-name="jdbc/MyDataSource"/>
6363
6464
<bean id="userDao" class="com.foo.JdbcUserDao">
6565
<!-- Spring will do the cast automatically (as usual) -->
66-
<property name="dataSource" ref="**dataSource**"/>
66+
<property name="dataSource" ref="dataSource"/>
6767
</bean>
6868
----
6969

0 commit comments

Comments
 (0)