* Configuration using the {@link ResolverUtil} class.
*
* @return a set of Class objects that represent subclasses of AutoExceptionHandler
*/
protected Set<Class<? extends AutoExceptionHandler>> findClasses() {
BootstrapPropertyResolver bootstrap = getConfiguration().getBootstrapPropertyResolver();
if (bootstrap.getProperty(URL_FILTERS) != null || bootstrap.getProperty(PACKAGE_FILTERS) != null) {
log.error("The configuration properties '", URL_FILTERS, "' and '", PACKAGE_FILTERS,
"' are deprecated, and NO LONGER SUPPORTED. Please read the upgrade ",
"documentation for Stripes 1.5 for how to resolve this situation. In short ",
"you should specify neither ", URL_FILTERS, " nor ", PACKAGE_FILTERS,
". Instead you should specify a comma separated list of package roots ",
"(e.g. com.myco.web) that should be scanned for implementations of ",
"AutoExceptionHandler, using the configuration parameter '", PACKAGES,
"', or include the packages along with other extension packages using the ",
"configuration parameter '", BootstrapPropertyResolver.PACKAGES, "'.");
}
// Try the config param that is specific to this class
String[] packages = StringUtil.standardSplit(bootstrap.getProperty(PACKAGES));
if (packages == null || packages.length == 0) {
// Config param not found so try autodiscovery
log.info("No config parameter '", PACKAGES, "' found. Trying autodiscovery instead.");
List<Class<? extends AutoExceptionHandler>> classes = bootstrap
.getClassPropertyList(AutoExceptionHandler.class);
if (!classes.isEmpty()) {
return new HashSet<Class<? extends AutoExceptionHandler>>(classes);
}
else {
// Autodiscovery found nothing so resort to looking at the ActionBean packages
log.info("Autodiscovery found no implementations of AutoExceptionHandler. Using ",
"the value of '", AnnotatedClassActionResolver.PACKAGES, "' instead.");
packages = StringUtil.standardSplit(bootstrap
.getProperty(AnnotatedClassActionResolver.PACKAGES));
}
}
if (packages != null && packages.length > 0) {