摘要: 1 pom依赖 我的spring版本是4.3.9 还有jackson版本2.8.8 <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-annotations</artifactId> <ver 阅读全文
posted @ 2017-10-23 16:57 qwer78 阅读(22) 评论(0) 推荐(0)
摘要: eclipse版本 1.给你的ide下载这个插件,并确定成功可用。具体百度 (eclipse直接搜索安装就行) 2.建议建立一个新的maven项目,然后生成的文件直接移过去。如图: 3.pom配置文件 加依赖呗 <project xmlns="http://maven.apache.org/POM/ 阅读全文
posted @ 2017-09-23 14:56 qwer78 阅读(109) 评论(0) 推荐(0)
摘要: 在优化关系数据库的关联查询的时候,ON的字段选择为数值型,必须是会比字符型的数据快很多的,那么如何将一个字符型的数据,唯一性地转为数值型呢? 一般我们会采用CRC32函数进行这个转换,CRC32会把字符串,生成一个long长整形的唯一性ID(虽然科学证明不绝对唯一,但是还是可用的)。 下面提供Jav 阅读全文
posted @ 2017-09-21 09:26 qwer78 阅读(210) 评论(0) 推荐(0)
摘要: controller代码: /** * 测试 * * */ @RequestMapping(value = "/test", method = RequestMethod.POST) public JsonResult test() { String url="https://api.douban. 阅读全文
posted @ 2017-09-11 16:42 qwer78 阅读(221) 评论(0) 推荐(0)
摘要: bookIn.setAuthor_Name(aut.replaceAll("\\(.*?\\)|\\{.*?}|\\[.*?]|(.*?)", "").trim()); 原字段:author_name=[英] 维克托•迈尔•舍恩伯格(Viktor Mayer-Schönberger), 效果: 阅读全文
posted @ 2017-09-11 16:29 qwer78 阅读(287) 评论(0) 推荐(0)
摘要: 需求:使用MyBatis往MySQL数据库中插入一条记录后,需要返回该条记录的自增主键值。 方法:在mapper中指定keyProperty属性,示例如下: <insert id="addCoupon" parameterType="com.datebook.entity.Coupon" useGe 阅读全文
posted @ 2017-09-07 17:49 qwer78 阅读(76) 评论(0) 推荐(0)
摘要: commonsmultipartresolver 的源码,可以研究一下 点我 前端代码: <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <!DOCTYPE html PUB 阅读全文
posted @ 2017-09-01 10:04 qwer78 阅读(49) 评论(0) 推荐(0)
摘要: 1. findByIds(List ids) 1. 当查询的参数只有一个时 findByIds(List<Long> ids) 如果参数的类型是List, 则在使用时,collection属性要必须指定为 list <select id="findByIdsMap" resultMap="BaseR 阅读全文
posted @ 2017-08-26 09:35 qwer78 阅读(33) 评论(0) 推荐(0)
摘要: 直接贴代码: 1. @RequestMapping(value = "/list", method = RequestMethod.POST) public JsonResult list() { List<Permit> list = permitService.getList(); Collec 阅读全文
posted @ 2017-08-03 15:26 qwer78 阅读(46) 评论(0) 推荐(0)
摘要: 最简单的方法: [root@localhost ~]# yum -y install wget 安装完毕即可。 阅读全文
posted @ 2017-07-11 15:06 qwer78 阅读(15) 评论(0) 推荐(0)