Polish contribution
See gh-31248
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -61,7 +61,7 @@ public abstract class AbstractRoutingDataSource extends AbstractDataSource imple
|
||||
|
||||
/**
|
||||
* Specify the map of target DataSources, with the lookup key as key.
|
||||
* The mapped value can either be a corresponding {@link javax.sql.DataSource}
|
||||
* <p>The mapped value can either be a corresponding {@link javax.sql.DataSource}
|
||||
* instance or a data source name String (to be resolved via a
|
||||
* {@link #setDataSourceLookup DataSourceLookup}).
|
||||
* <p>The key can be of arbitrary type; this class implements the
|
||||
@@ -114,15 +114,23 @@ public abstract class AbstractRoutingDataSource extends AbstractDataSource imple
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Delegates to {@link #initialize()}.
|
||||
*/
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
initialize();
|
||||
}
|
||||
|
||||
/**
|
||||
* Synchronizes targetDataSources to resolvedDataSources
|
||||
* and defaultTargetDataSource to resolvedDefaultDataSource.
|
||||
* @throws IllegalArgumentException in case of targetDataSources is null
|
||||
* Initialize the internal state of this {@code AbstractRoutingDataSource}
|
||||
* by resolving the configured target DataSources.
|
||||
* @throws IllegalArgumentException if the target DataSources have not been configured
|
||||
* @since 6.1
|
||||
* @see #setTargetDataSources(Map)
|
||||
* @see #setDefaultTargetDataSource(Object)
|
||||
* @see #getResolvedDataSources()
|
||||
* @see #getResolvedDefaultDataSource()
|
||||
*/
|
||||
public void initialize() {
|
||||
if (this.targetDataSources == null) {
|
||||
|
||||
Reference in New Issue
Block a user