Skip to content

Commit a0773ae

Browse files
committed
Polishing
1 parent cc56ef5 commit a0773ae

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

spring-context/src/main/java/org/springframework/context/annotation/Bean.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@
4444
*
4545
* <h3>Bean Names</h3>
4646
*
47-
* <p>While a {@link #name() name} attribute is available, the default strategy for
47+
* <p>While a {@link #name} attribute is available, the default strategy for
4848
* determining the name of a bean is to use the name of the {@code @Bean} method.
4949
* This is convenient and intuitive, but if explicit naming is desired, the
50-
* {@code name} attribute may be used. Also note that {@code name} accepts an array
51-
* of Strings. This is in order to allow for specifying multiple names (i.e., aliases)
52-
* for a single bean.
50+
* {@code name} attribute may be used. Also note that {@code name} accepts an
51+
* array of Strings, allowing for multiple names (i.e. a primary bean name plus
52+
* one or more aliases) for a single bean.
5353
*
5454
* <pre class="code">
5555
* &#064;Bean(name={"b1","b2"}) // bean available as 'b1' and 'b2', but not 'myBean'
@@ -78,9 +78,9 @@
7878
* <h3>{@code @Bean} Methods in {@code @Configuration} Classes</h3>
7979
*
8080
* <p>Typically, {@code @Bean} methods are declared within {@code @Configuration}
81-
* classes. In this case, bean methods may reference other {@code @Bean} methods
82-
* in the same class by calling them <i>directly</i>. This ensures that references between
83-
* beans are strongly typed and navigable. Such so-called <em>'inter-bean references'</em> are
81+
* classes. In this case, bean methods may reference other {@code @Bean} methods in the
82+
* same class by calling them <i>directly</i>. This ensures that references between beans
83+
* are strongly typed and navigable. Such so-called <em>'inter-bean references'</em> are
8484
* guaranteed to respect scoping and AOP semantics, just like {@code getBean()} lookups
8585
* would. These are the semantics known from the original 'Spring JavaConfig' project
8686
* which require CGLIB subclassing of each such configuration class at runtime. As a
@@ -190,9 +190,9 @@
190190
public @interface Bean {
191191

192192
/**
193-
* The name of this bean, or if plural, aliases for this bean. If left unspecified
194-
* the name of the bean is the name of the annotated method. If specified, the method
195-
* name is ignored.
193+
* The name of this bean, or if several names, a primary bean name plus aliases.
194+
* <p>If left unspecified, the name of the bean is the name of the annotated method.
195+
* If specified, the method name is ignored.
196196
*/
197197
String[] name() default {};
198198

spring-websocket/src/test/java/org/springframework/web/socket/TomcatWebSocketTestServer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -95,7 +95,7 @@ public int getPort() {
9595
public void deployConfig(WebApplicationContext wac, Filter... filters) {
9696
Assert.state(this.port != -1, "setup() was never called.");
9797
this.context = this.tomcatServer.addContext("", System.getProperty("java.io.tmpdir"));
98-
this.context.addApplicationListener(WsContextListener.class.getName());
98+
this.context.addApplicationListener(WsContextListener.class.getName());
9999
Tomcat.addServlet(this.context, "dispatcherServlet", new DispatcherServlet(wac)).setAsyncSupported(true);
100100
this.context.addServletMapping("/", "dispatcherServlet");
101101
for (Filter filter : filters) {

0 commit comments

Comments
 (0)