|
@@ -28,6 +28,7 @@ import com.zkqy.system.domain.SysTenantMenu;
|
|
|
import com.zkqy.system.mapper.*;
|
|
|
import com.zkqy.system.service.ISysUserService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.core.io.ClassPathResource;
|
|
|
import org.springframework.core.io.Resource;
|
|
|
import org.springframework.core.io.ResourceLoader;
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
@@ -200,7 +201,9 @@ public class SysTenantServiceImpl implements ISysTenantService {
|
|
|
// module.addDeserializer(Date.class, new CustomDateDeserializer());
|
|
|
// objectMapper.registerModule(module);
|
|
|
try {
|
|
|
- Resource resource = resourceLoader.getResource("classpath:sql/initialize_sys_tenant_menu.json");
|
|
|
+ //这个东西在部署环境下会出现问题
|
|
|
+// Resource resource = resourceLoader.getResource("classpath:sql/initialize_sys_tenant_menu.json");
|
|
|
+ Resource resource = new ClassPathResource("sql/initialize_sys_tenant_menu.json");
|
|
|
//获取租户默认菜单信息
|
|
|
List<SysMenu> menus = objectMapper.readValue(resource.getFile(), objectMapper.getTypeFactory().constructCollectionType(List.class, SysMenu.class));
|
|
|
//字符串备用方案
|