| | |
| | | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.nio.file.Files; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | * */ |
| | | public CaseAreaDTO getArea() throws IOException { |
| | | Class<?> clazz = CaseAreaDTO.class; |
| | | String path = clazz.getResource("").getPath(); |
| | | String path = clazz.getProtectionDomain().getCodeSource().getLocation().getPath(); |
| | | ObjectMapper mapper = new ObjectMapper(); |
| | | File file = new File(path+"Area.json"); |
| | | File file = new File(path+ "cn"+File.separator+"huge"+File.separator+"module"+File.separator+"cases"+File.separator+"domain"+File.separator+"json"+File.separator+"Area.json"); |
| | | CaseAreaDTO obj = mapper.readValue(file, CaseAreaDTO.class); |
| | | return obj; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据不同的等级获取不同区域子集合 |
| | | * @param areaType 1-市级 2-区 |