QQ交流群:
本项目的Mysql和MongoDB数据库(下面是详细的处理过程,免做伸手党,学习学习没坏处):
https://git.oschina.net/duhongming/spring-boot-data-supporter/attach_files
爬取国家统计局官网的行政区域数据:http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/
#数据库设置问题:set global max_allowed_packet=1024*1024*160这样就好了(因为太大了100多M,所以我设置了160M):
ERROR 2006 (HY000) at line 22: MySQL server has gone away
Operation failed with exitcode 1
3) 重命名表:cnarea_2018 >>> cnarea
4)Mysql转MongoDB数据库用的是MongoVUE,Collections右键>>>RDBMS Import>>>from Mysql
5)更新数据库中集合的字段
db.cnarea.update({}, {$rename : {"parent_id" : "parentId","area_code" : "areaCode","zip_code" : "zipCode","city_code" : "cityCode","short_name" : "shortName","merger_name" : "mergerName"}}, false, true);
6)windows导出MongoDB数据库
mongodump -d data-supporter -c cnarea -o D:/mongodump/
7)windows导入MongoDB数据库(支持跨服务器,非常方便,速度非常快)
mongorestore -h 192.168.1.108 -d data-supporter --dir D:/mongodump/data-supporter/
application.properties配置文件中
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/data-supporter
spring.datasource.username=root
spring.datasource.password=root
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.data.mongodb.uri=mongodb://127.0.0.1:27017/data-supporter
http://localhost:8080/swagger-ui.html
地理区域省级调试页面:
地理区域第2-5级调试页面:
https://github.com/NoBey/IdCard
下载IdCard/data/data.json,重命名为idcard.json,放到resources\static文件夹下
Map<String, Object> map = JsonUtil.toMap(JsonUtil.parseJson(injectInfo()));
在application.properties配置关联路径即可:
ip.region.db.file=D:\\gitRespo\\open-source\\spring-boot-data-supporter\\resources\\static\\ipdata\\ip2region.db
3) 演示地址:http://localhost:8080/swagger-ui.html
https://github.com/NLPchina/ansj_seg
Spring Boot 教程大家学习下: http://blog.didispace.com/categories/Spring-Boot/page/4/
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
1. 开源生态
2. 协作、人、软件
3. 评估模型