提交 05e96ec4 编写于 作者: cxt104926's avatar cxt104926

初始化

上级 6f0e3fb7
......@@ -18,13 +18,13 @@ import org.springframework.stereotype.Component;
@Component
@Slf4j
public class ApplicationRunnerImpl implements ApplicationRunner {
private StuMapper stuUserMapper;
private StuMapper stuMapper;
@Override
public void run(ApplicationArguments args) throws Exception {
StuUser admin = stuUserMapper.selectOne(new StuUser("admin"));
StuUser admin = stuMapper.selectOne(new StuUser("admin"));
if (admin == null) {
int insert = stuUserMapper.insert(new StuUser("INIT20200908", "20200908", "admin", "1zEd9KsK+pN1/yqGuW2JgcDDFng=", Jurisdiction.ADMIN));
int insert = stuMapper.insert(new StuUser("INIT20200908", "20200908", "admin", "1zEd9KsK+pN1/yqGuW2JgcDDFng=", Jurisdiction.ADMIN));
if (insert != 1) {
log.debug("数据库插入管理员信息失败!");
throw new Exception("数据库初始化失败!请联系管理员!");
......@@ -33,7 +33,7 @@ public class ApplicationRunnerImpl implements ApplicationRunner {
}
@Autowired
public void setStuUserMapper(StuMapper stuUserMapper) {
this.stuUserMapper = stuUserMapper;
public void setStuUserMapper(StuMapper stuMapper) {
this.stuMapper = stuMapper;
}
}
......@@ -8,6 +8,7 @@ class StusystemApplicationTests {
@Test
void contextLoads() {
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册