Skip to content
This repository was archived by the owner on Nov 28, 2024. It is now read-only.

mpobjects/spring-mpo-util

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Maven Central Sonatype Nexus (Snapshots) License

spring-mpo-util

Spring Framework Utilities

XML Namespace: MPO Util

xmlns:mpo="http://system.mp-objects.com/schemas/spring/util"
xsi:xsi:schemaLocation="
	http://system.mp-objects.com/schemas/spring/util 
	http://system.mp-objects.com/schemas/spring/util/mpo-util.xsd
"

mpo:resources

<mpo:resources groups="groups.list" pattern="(.*)\.foo\.xml">
	<value>classpath*:*.foo.xml</value>
</mpo:resources>

This creates a List<Resource> bean with the resources sorted and filtered according to the group specification. Resources not in the group list are filtered out.

The content of the element is just like the util:list element, and is expected to contain String values which are Spring resource locations.

Attributes

groups

A Spring resource location to a file containing the sorted list of accepted groups, which each group on a separate line.

If no groups are defined all resources are accepted and the list is unsorted.

groups-ref

A reference to a List<String> bean containing the groups. Either groups or groups-ref can be specified. Not both.

pattern

A regular expression executed on the resource's name in order to find the group. By default the first matching group is used as the value of the group.

group-index

Defined which group in the pattern expression contains the group value.

resource-name

Defines what value of the resource to use as name in the pattern matching. The default is filename which is just the filename without any path element. Alternatively uri can be used which uses the full resource URI.

scope

Spring bean scope.

About

Spring Framework Utilities

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published