|
|
|
@ -51,7 +51,13 @@ public class ScheduleConfig extends ThreadPoolTaskScheduler implements BeanDefin
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry beanDefinitionRegistry) throws BeansException {
|
|
|
|
|
registryTask("${basePackage}.task", beanDefinitionRegistry);
|
|
|
|
|
String aPackage = this.getClass().getPackage().getName();
|
|
|
|
|
Pattern compile = Pattern.compile("(.*)\\.config");
|
|
|
|
|
Matcher matcher = compile.matcher(aPackage);
|
|
|
|
|
if (matcher.find()) {
|
|
|
|
|
String basePackage = matcher.group(1);
|
|
|
|
|
registryTask(basePackage + ".task", beanDefinitionRegistry);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|