Former-commit-id: 3ae467fbfaf0d999adbeadba3c061f82187fc719
master
wangbing 5 years ago
parent 8e57ac8679
commit 44b1fe9f7e

@ -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

Loading…
Cancel
Save

Powered by TurnKey Linux.