|
|
@ -1,26 +1,23 @@
|
|
|
|
package com.anjiplus.template.gaea.business.runner;
|
|
|
|
package com.anjiplus.template.gaea.business.runner;
|
|
|
|
|
|
|
|
|
|
|
|
import com.anji.plus.gaea.constant.Enabled;
|
|
|
|
import com.anjiplus.template.gaea.business.modules.accessauthority.service.AccessAuthorityService;
|
|
|
|
import com.anji.plus.gaea.init.InitRequestUrlMappings;
|
|
|
|
|
|
|
|
import com.anjiplus.template.gaea.business.modules.dict.service.GaeaDictService;
|
|
|
|
import com.anjiplus.template.gaea.business.modules.dict.service.GaeaDictService;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.boot.ApplicationArguments;
|
|
|
|
import org.springframework.boot.ApplicationArguments;
|
|
|
|
import org.springframework.boot.ApplicationRunner;
|
|
|
|
import org.springframework.boot.ApplicationRunner;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 启动加载后执行
|
|
|
|
* @desc 启动加载器
|
|
|
|
* @author lr
|
|
|
|
* @author WongBin <abc13579d@163.com>
|
|
|
|
* @since 2021-04-08
|
|
|
|
* @date 2019-02-17 08:50:10.009
|
|
|
|
*/
|
|
|
|
**/
|
|
|
|
public class ApplicationInitRunner implements ApplicationRunner {
|
|
|
|
public class ApplicationInitRunner implements ApplicationRunner {
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private GaeaDictService gaeaDictService;
|
|
|
|
private GaeaDictService gaeaDictService;
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private InitRequestUrlMappings initRequestUrlMappings;
|
|
|
|
private AccessAuthorityService accessAuthorityService;
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void run(ApplicationArguments args) throws Exception {
|
|
|
|
public void run(ApplicationArguments args) throws Exception {
|
|
|
@ -28,9 +25,7 @@ public class ApplicationInitRunner implements ApplicationRunner {
|
|
|
|
//1、数据字典刷新
|
|
|
|
//1、数据字典刷新
|
|
|
|
// gaeaDictService.refreshCache(null);
|
|
|
|
// gaeaDictService.refreshCache(null);
|
|
|
|
|
|
|
|
|
|
|
|
//获取当前应用中所有的请求信息
|
|
|
|
//2. 建立url权限拦截体系
|
|
|
|
//List<InitRequestUrlMappings.RequestInfo> requestInfos = initRequestUrlMappings.getRequestInfos(Enabled.YES.getValue());
|
|
|
|
accessAuthorityService.scanGaeaSecurityAuthorities();
|
|
|
|
|
|
|
|
|
|
|
|
//System.out.println(requestInfos);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|