自动建表功能修改
This commit is contained in:
parent
826dc9d7fb
commit
33564ca4e7
@ -8,6 +8,7 @@ import ink.wgink.exceptions.SaveException;
|
|||||||
import ink.wgink.exceptions.SearchException;
|
import ink.wgink.exceptions.SearchException;
|
||||||
import ink.wgink.exceptions.UpdateException;
|
import ink.wgink.exceptions.UpdateException;
|
||||||
|
|
||||||
|
import ink.wgink.interfaces.init.IInitBaseTable;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -21,13 +22,9 @@ import java.util.Map;
|
|||||||
* @Version: 3.0
|
* @Version: 3.0
|
||||||
**/
|
**/
|
||||||
@Repository
|
@Repository
|
||||||
public interface IInstitutionDao {
|
public interface IInstitutionDao extends IInitBaseTable {
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 建表
|
|
||||||
* @throws UpdateException
|
|
||||||
*/
|
|
||||||
void createTable() throws UpdateException;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
package cn.com.tenlion.institutionmanagement.init;
|
|
||||||
|
|
||||||
|
|
||||||
import cn.com.tenlion.institutionmanagement.dao.institution.IInstitutionDao;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.boot.ApplicationArguments;
|
|
||||||
import org.springframework.boot.ApplicationRunner;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 模块初始化函数
|
|
||||||
*/
|
|
||||||
@Component
|
|
||||||
public class InitModule implements ApplicationRunner {
|
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(InitModule.class);
|
|
||||||
@Autowired
|
|
||||||
private IInstitutionDao iInstitutionDao;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void run(ApplicationArguments args) throws Exception {
|
|
||||||
initTable();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initTable(){
|
|
||||||
LOG.debug("初始化机构信息表");
|
|
||||||
iInstitutionDao.createTable();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user