Deprecate rarely used bean definition variants

Closes gh-24875
This commit is contained in:
Juergen Hoeller
2020-06-17 10:59:55 +02:00
parent 6ea7ff1c6d
commit d36407d585
10 changed files with 55 additions and 115 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2020 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.
@@ -21,7 +21,6 @@ import java.util.Properties;
import javax.sql.DataSource;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.PropertiesBeanDefinitionReader;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
@@ -42,10 +41,13 @@ import org.springframework.util.Assert;
* @author Juergen Hoeller
* @see #loadBeanDefinitions
* @see org.springframework.beans.factory.support.PropertiesBeanDefinitionReader
* @deprecated as of 5.3, in favor of Spring's common bean definition formats
* and/or custom reader implementations
*/
@Deprecated
public class JdbcBeanDefinitionReader {
private final PropertiesBeanDefinitionReader propReader;
private final org.springframework.beans.factory.support.PropertiesBeanDefinitionReader propReader;
@Nullable
private JdbcTemplate jdbcTemplate;
@@ -59,7 +61,7 @@ public class JdbcBeanDefinitionReader {
* @see #setJdbcTemplate
*/
public JdbcBeanDefinitionReader(BeanDefinitionRegistry beanFactory) {
this.propReader = new PropertiesBeanDefinitionReader(beanFactory);
this.propReader = new org.springframework.beans.factory.support.PropertiesBeanDefinitionReader(beanFactory);
}
/**
@@ -69,9 +71,9 @@ public class JdbcBeanDefinitionReader {
* @see #setDataSource
* @see #setJdbcTemplate
*/
public JdbcBeanDefinitionReader(PropertiesBeanDefinitionReader beanDefinitionReader) {
Assert.notNull(beanDefinitionReader, "Bean definition reader must not be null");
this.propReader = beanDefinitionReader;
public JdbcBeanDefinitionReader(org.springframework.beans.factory.support.PropertiesBeanDefinitionReader reader) {
Assert.notNull(reader, "Bean definition reader must not be null");
this.propReader = reader;
}