Class FilePatternResourceHintsRegistrar.Builder
java.lang.Object
org.springframework.aot.hint.support.FilePatternResourceHintsRegistrar.Builder
- Enclosing class:
FilePatternResourceHintsRegistrar
Builder for
FilePatternResourceHintsRegistrar.- Since:
- 6.0.12
- Author:
- Stephane Nicoll, Sam Brannen, Juergen Hoeller
-
Method Summary
Modifier and TypeMethodDescriptionvoidregisterHints(ResourceHints hints, @Nullable ClassLoader classLoader) Register resource hints for the current state of this builder.withClasspathLocations(String... classpathLocations) Deprecated, for removal: This API element is subject to removal in a future version.withClasspathLocations(List<String> classpathLocations) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofwithClassPathLocations(List)withClassPathLocations(String... classpathLocations) Consider the specified classpath locations.withClassPathLocations(List<String> classpathLocations) Consider the specified classpath locations.withFileExtensions(String... fileExtensions) Consider the specified file extensions.withFileExtensions(List<String> fileExtensions) Consider the specified file extensions.withFilePrefixes(String... filePrefixes) Consider the specified file prefixes.withFilePrefixes(List<String> filePrefixes) Consider the specified file prefixes.
-
Method Details
-
withClasspathLocations
@Deprecated(since="7.0", forRemoval=true) public FilePatternResourceHintsRegistrar.Builder withClasspathLocations(String... classpathLocations) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofwithClassPathLocations(String...)Consider the specified classpath locations. -
withClasspathLocations
@Deprecated(since="7.0", forRemoval=true) public FilePatternResourceHintsRegistrar.Builder withClasspathLocations(List<String> classpathLocations) Deprecated, for removal: This API element is subject to removal in a future version.in favor ofwithClassPathLocations(List)Consider the specified classpath locations. -
withClassPathLocations
public FilePatternResourceHintsRegistrar.Builder withClassPathLocations(String... classpathLocations) Consider the specified classpath locations.A location can either be a special "classpath:" pseudo location or a standard location, such as
com/example/resources. An empty String represents the root of the classpath.- Parameters:
classpathLocations- the classpath locations to consider- Returns:
- this builder
- Since:
- 7.0
- See Also:
-
withClassPathLocations
public FilePatternResourceHintsRegistrar.Builder withClassPathLocations(List<String> classpathLocations) Consider the specified classpath locations.A location can either be a special "classpath:" pseudo location or a standard location, such as
com/example/resources. An empty String represents the root of the classpath.- Parameters:
classpathLocations- the classpath locations to consider- Returns:
- this builder
- Since:
- 7.0
- See Also:
-
withFilePrefixes
Consider the specified file prefixes. Any file whose name starts with one of the specified prefixes is considered. A prefix cannot contain the*character.- Parameters:
filePrefixes- the file prefixes to consider- Returns:
- this builder
- See Also:
-
withFilePrefixes
Consider the specified file prefixes. Any file whose name starts with one of the specified prefixes is considered. A prefix cannot contain the*character.- Parameters:
filePrefixes- the file prefixes to consider- Returns:
- this builder
- See Also:
-
withFileExtensions
Consider the specified file extensions. A file extension must start with a.character.- Parameters:
fileExtensions- the file extensions to consider- Returns:
- this builder
- See Also:
-
withFileExtensions
Consider the specified file extensions. A file extension must start with a.character.- Parameters:
fileExtensions- the file extensions to consider- Returns:
- this builder
- See Also:
-
registerHints
Register resource hints for the current state of this builder. For each classpath location that resolves against theClassLoader, files with the configured file prefixes and extensions are registered.- Parameters:
hints- the hints contributed so far for the deployment unitclassLoader- the ClassLoader to use, ornullfor the default
-
withClassPathLocations(String...)