Browse Source

Introduce PropertiesBasedNamedQueriesFactoryBean to reduce bean indirections.

We now provide PropertiesBasedNamedQueriesFactoryBean to create PropertiesBasedNamedQueries directly bypassing indirections through PropertiesFactoryBean and PropertiesBasedNamedQueries.

Original Pull Request: #2624
pull/2652/head
Mark Paluch 4 years ago committed by Christoph Strobl
parent
commit
51cda9993f
No known key found for this signature in database
GPG Key ID: 8CC1AB53391458C8
  1. 7
      src/main/java/org/springframework/data/repository/config/NamedQueriesBeanDefinitionBuilder.java

7
src/main/java/org/springframework/data/repository/config/NamedQueriesBeanDefinitionBuilder.java

@ -15,12 +15,9 @@ @@ -15,12 +15,9 @@
*/
package org.springframework.data.repository.config;
import java.io.IOException;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.core.io.ClassPathResource;
import org.springframework.data.repository.core.NamedQueries;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
@ -45,7 +42,7 @@ public class NamedQueriesBeanDefinitionBuilder { @@ -45,7 +42,7 @@ public class NamedQueriesBeanDefinitionBuilder {
@SuppressWarnings("null")
public NamedQueriesBeanDefinitionBuilder(String defaultLocation) {
Assert.hasText(defaultLocation, "DefaultLocation must not be null nor empty");
Assert.hasText(defaultLocation, "DefaultLocation must not be null nor empty!");
this.defaultLocation = defaultLocation;
}
@ -56,7 +53,7 @@ public class NamedQueriesBeanDefinitionBuilder { @@ -56,7 +53,7 @@ public class NamedQueriesBeanDefinitionBuilder {
*/
public void setLocations(String locations) {
Assert.hasText(locations, "Locations must not be null nor empty");
Assert.hasText(locations, "Locations must not be null nor empty!");
this.locations = locations;
}

Loading…
Cancel
Save