在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:spring-boot-data-supporter开源软件地址:https://gitee.com/duhongming/spring-boot-data-supporter开源软件介绍:spring-boot-data-supporterQQ交流群: 本项目的Mysql和MongoDB数据库(下面是详细的处理过程,免做伸手党,学习学习没坏处): https://git.oschina.net/duhongming/spring-boot-data-supporter/attach_files new-使用NLP和Hadoop统计分词个数new-基金决策分析new-慕课网数据爬取与分析1 地理区域5级联动2 身份证信息3 全国天气情况4 基金决策分析5 ip地址定位库6 一元线性回归获取样本数据建立模型7 Ansj中文分词服务1 地理区域5级联动1.1 数据源导入到Mysql和MongoDB中
爬取国家统计局官网的行政区域数据: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 awayOperation 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/ 1.2 修改数据库配置信息application.properties配置文件中 spring.datasource.url=jdbc:mysql://127.0.0.1:3306/data-supporterspring.datasource.username=rootspring.datasource.password=rootspring.datasource.driver-class-name=com.mysql.jdbc.Driverspring.data.mongodb.uri=mongodb://127.0.0.1:27017/data-supporter 1.3 请通过swagger进行项目调试http://localhost:8080/swagger-ui.html 地理区域省级调试页面: 地理区域第2-5级调试页面: 1.4 地理区域5级联动演示页面2 身份证信息2.1 下载身份证信息json库https://github.com/NoBey/IdCard 下载IdCard/data/data.json,重命名为idcard.json,放到resources\static文件夹下 2.2 身份证信息用Gson将Json数据转成Map,其他的Json框架都试了,都不好用Map<String, Object> map = JsonUtil.toMap(JsonUtil.parseJson(injectInfo())); 2.3 idcard身份证信息获取出生年月日、岁数、性别、生肖、星座、地理位置3 全国天气情况3.1 全国天气情况3.2 获取某个城市的一段时间的天气5 ip地址定位库
ip.region.db.file=D:\\gitRespo\\open-source\\spring-boot-data-supporter\\resources\\static\\ipdata\\ip2region.db 3) 演示地址:http://localhost:8080/swagger-ui.html 6 一元线性回归获取样本数据建立模型7 Ansj中文分词服务https://github.com/NLPchina/ansj_seg Spring Boot 教程大家学习下:http://blog.didispace.com/categories/Spring-Boot/page/4/ |
请发表评论