Fix for start-up problem if WAR is NOT unpacked (relevant e.g. for upcoming Spring Boot + MariaDB4j java -jar mifos.war

This commit is contained in:
Michael Vorburger
2014-09-22 01:03:36 +02:00
parent 0d8bd285dc
commit 0e2f0eb85c
@@ -60,7 +60,8 @@ public class CronMethodParser {
throws IOException {
final String basePackagePath = ClassUtils.convertClassNameToResourcePath(new StandardEnvironment()
.resolveRequiredPlaceholders(SEARCH_PACKAGE));
final String packageSearchPath = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX + basePackagePath + "/" + RESOURCE_PATTERN;
String packageSearchPath = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX + basePackagePath + "/" + RESOURCE_PATTERN;
packageSearchPath = packageSearchPath.replace("//", "/"); // else it doesn't work if *.class are in WAR!!
final Resource[] resources = resourcePatternResolver.getResources(packageSearchPath);
for (final Resource resource : resources) {
if (resource.isReadable()) {