update InitCoreData.java.

This commit is contained in:
thinkgem
2022-07-06 14:32:29 +08:00
parent 91e418fcec
commit d5944598c2

View File

@@ -375,13 +375,13 @@ public class InitCoreData extends BaseInitDataTests {
}); });
} }
@Autowired @Autowired(required = false)
private JobDao jobDao; // 默认情况下job是关闭状态需要注入jobDao private JobDao jobDao; // 默认情况下job是关闭状态需要注入jobDao
/** /**
* 初始化消息推送服务 * 初始化消息推送服务
*/ */
public void initJob(){ public void initJob(){
if (!checkTable(JobEntity.class)) { if (jobDao == null || !checkTable(JobEntity.class)) {
return; return;
} }
JobEntity job = new JobEntity(MsgLocalPushTask.class.getSimpleName(), "SYSTEM"); JobEntity job = new JobEntity(MsgLocalPushTask.class.getSimpleName(), "SYSTEM");