https://wuliu.taobao.com/user/output_address.do?range=country
https://wuliu.taobao.com/user/output_address.do?range=province
https://wuliu.taobao.com/user/output_address.do?range=city
https://wuliu.taobao.com/user/output_address.do?range=county
将上面获取的json拷贝到txt文件里面,下面是mac系统的,如果是windows系统,那么修改
String url = "/Users/tentsuuhou/Desktop/"+name+".txt";
这个路径转换程你拷贝json到txt文件的路径就可以了
package com.dtb.member.controller.api;
import com.dtb.member.mapper.AreaDaoMapper;
import com.dtb.member.service.ApiLogService;
import com.dtb.member.util.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.Response