Skip to content

Commit 51cda99

Browse files
mp911dechristophstrobl
authored andcommitted
Introduce PropertiesBasedNamedQueriesFactoryBean to reduce bean indirections.
We now provide PropertiesBasedNamedQueriesFactoryBean to create PropertiesBasedNamedQueries directly bypassing indirections through PropertiesFactoryBean and PropertiesBasedNamedQueries. Original Pull Request: #2624
1 parent 0262380 commit 51cda99

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

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

+2-5
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,9 @@
1515
*/
1616
package org.springframework.data.repository.config;
1717

18-
import java.io.IOException;
19-
2018
import org.springframework.beans.factory.config.BeanDefinition;
2119
import org.springframework.beans.factory.support.AbstractBeanDefinition;
2220
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
23-
import org.springframework.core.io.ClassPathResource;
2421
import org.springframework.data.repository.core.NamedQueries;
2522
import org.springframework.lang.Nullable;
2623
import org.springframework.util.Assert;
@@ -45,7 +42,7 @@ public class NamedQueriesBeanDefinitionBuilder {
4542
@SuppressWarnings("null")
4643
public NamedQueriesBeanDefinitionBuilder(String defaultLocation) {
4744

48-
Assert.hasText(defaultLocation, "DefaultLocation must not be null nor empty");
45+
Assert.hasText(defaultLocation, "DefaultLocation must not be null nor empty!");
4946
this.defaultLocation = defaultLocation;
5047
}
5148

@@ -56,7 +53,7 @@ public NamedQueriesBeanDefinitionBuilder(String defaultLocation) {
5653
*/
5754
public void setLocations(String locations) {
5855

59-
Assert.hasText(locations, "Locations must not be null nor empty");
56+
Assert.hasText(locations, "Locations must not be null nor empty!");
6057

6158
this.locations = locations;
6259
}

0 commit comments

Comments
 (0)