Skip to content

Commit e919a57

Browse files
committed
javadocs
1 parent 4ac2377 commit e919a57

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/main/java/org/mybatis/spring/mapper/MapperScannerConfigurer.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
* interfaces and registers them as {@code MapperFactoryBean}. Note that only interfaces with at
4747
* least one method will be registered; concrete classes will be ignored.
4848
* <p>
49+
* This class was a {code BeanFactoryPostProcessor} until 1.0.1 version. It changed to
50+
* {@code BeanDefinitionRegistryPostProcessor} in 1.0.2. See https://jira.springsource.org/browse/SPR-8269
51+
* for the details.
52+
* <p>
4953
* The {@code basePackage} property can contain more than one package name, separated by either
5054
* commas or semicolons.
5155
* <p>
@@ -56,14 +60,16 @@
5660
* these two properties are null, so all interfaces in the given {@code basePackage} are added as
5761
* mappers.
5862
* <p>
59-
* This configurer is usually used with autowire enabled so all the beans it creates are
63+
* This configurer enables autowire for all the beans that it creates so that they are
6064
* automatically autowired with the proper {@code SqlSessionFactory} or {@code SqlSessionTemplate}.
6165
* If there is more than one {@code SqlSessionFactory} in the application, however, autowiring
6266
* cannot be used. In this case you must explicitly specify either an {@code SqlSessionFactory} or
6367
* an {@code SqlSessionTemplate} to use via the <em>bean name</em> properties. Bean names are used
6468
* rather than actual objects because Spring does not initialize property placeholders until after
65-
* this class is processed. Passing in an actual object which may require placeholders (i.e. DB user
66-
* / password) will fail. Using bean names defers actual object creation until later in the startup
69+
* this class is processed.
70+
* <p>
71+
* Passing in an actual object which may require placeholders (i.e. DB user password) will fail.
72+
* Using bean names defers actual object creation until later in the startup
6773
* process, after all placeholder substituation is completed. However, note that this configurer
6874
* does support property placeholders of its <em>own</em> properties. The <code>basePackage</code>
6975
* and bean name properties all support <code>${property}</code> style substitution.
@@ -279,10 +285,13 @@ public void afterPropertiesSet() throws Exception {
279285
* {@inheritDoc}
280286
*/
281287
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
288+
// left intentionally blank
282289
}
283290

284291
/**
285292
* {@inheritDoc}
293+
*
294+
* @since 1.0.2
286295
*/
287296
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
288297
if (this.processPropertyPlaceHolders) {

0 commit comments

Comments
 (0)