From 1dd1f66d7645748311e162ffaf5a528662e7e795 Mon Sep 17 00:00:00 2001 From: runbeyondmove <8804977+runbeyondmove@users.noreply.github.com> Date: Fri, 26 Jan 2018 11:06:16 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=A1=A5=E5=85=85=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 补充说明 --- "\350\241\245\345\205\205.md" | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 "\350\241\245\345\205\205.md" diff --git "a/\350\241\245\345\205\205.md" "b/\350\241\245\345\205\205.md" new file mode 100644 index 000000000..c8d16b55d --- /dev/null +++ "b/\350\241\245\345\205\205.md" @@ -0,0 +1,38 @@ +1. 前端参数签名怎么生成 +建议使用 JWT +一个文章连接:https://www.jianshu.com/p/576dbf44b2ae + +2. 复制单表查询 +两种方式: + 1. 直接在 xml 中写 sql + 2. 使用 Condition 对象,具体用法可以看下通用 Mapper 的文档 + +3. 关于集成devtools热部署的问题 + 问题一般就是使用了不同的类加载器引起的 + 解决方案请查询通用Mapper + https://github.com/abel533/MyBatis-Spring-Boot#spring-devtools-%E9%85%8D%E7%BD%AE + +4. 多数据源 + 在Spring Boot中配置多数据源&使用动态数据源:https://www.jianshu.com/p/79fd05269e79 + 或者查看SpringBoot Druid的官网:https://github.com/alibaba/druid/tree/master/druid-spring-boot-starter + 推荐使用V1.1.1以上版本 + +5. 关于如何对该种子项目进行改造以适应于前台项目、后台管理项目的解答 + https://github.com/lihengming/spring-boot-api-project-seed/issues/11 + +6. 跨域问题怎么解决 + registry.addMapping("/**").allowedMethods("GET", "POST", "PUT", "DELETE", "HEAD") + +7. insertSelective如何返回主键ID? + 这是MyBastis默认的,返回的都是记录数。你要取的主键的话,插入成功后直接从Model对象取就可以了,会自动注入回来的。 + + User user = new User(); + user.setName(“土豆”); + userMapper.insertSelective(user); + user.getId();//即可 + +8. 通用Mapper文档 + https://mapperhelper.github.io/docs/7.use330/ + +9. 签名认证请求发送之前的sign如何生成 + https://github.com/lihengming/spring-boot-api-project-seed/issues/8 \ No newline at end of file From 20001a77ebe12bfef77a5dbf745d61be6f9115ae Mon Sep 17 00:00:00 2001 From: runbeyondmove Date: Wed, 28 Mar 2018 15:19:40 +0800 Subject: [PATCH 2/5] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]HuTool=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 7 +++++++ "\350\241\245\345\205\205.md" | 23 ++++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ed74bf412..540b7c826 100644 --- a/pom.xml +++ b/pom.xml @@ -102,6 +102,13 @@ 1.3.5 test + + + + cn.hutool + hutool-all + 4.0.8 + diff --git "a/\350\241\245\345\205\205.md" "b/\350\241\245\345\205\205.md" index c8d16b55d..5077533da 100644 --- "a/\350\241\245\345\205\205.md" +++ "b/\350\241\245\345\205\205.md" @@ -35,4 +35,25 @@ https://mapperhelper.github.io/docs/7.use330/ 9. 签名认证请求发送之前的sign如何生成 - https://github.com/lihengming/spring-boot-api-project-seed/issues/8 \ No newline at end of file + https://github.com/lihengming/spring-boot-api-project-seed/issues/8 + +10. hutool工具包模块 + +> 一个Java基础工具类,对文件、流、加密解密、转码、正则、线程、XML等JDK方法进行封装,组成各种Util工具类,同时提供以下组件: + +> - hutool-aop JDK动态代理封装,提供非IOC下的切面支持 +> - hutool-bloomFilter 布隆过滤,提供一些Hash算法的布隆过滤 +> - hutool-cache 缓存 +> - hutool-core 核心,包括Bean操作、日期、各种Util等 +> - hutool-cron 定时任务模块,提供类Crontab表达式的定时任务 +> - hutool-crypto 加密解密模块 +> - hutool-db JDBC封装后的数据操作,基于ActiveRecord思想 +> - hutool-dfa 基于DFA模型的多关键字查找 +> - hutool-extra 扩展模块,对第三方封装(模板引擎、邮件、Servlet、二维码等) +> - hutool-http 基于HttpUrlConnection的Http客户端封装 +> - hutool-log 自动识别日志实现的日志门面 +> - hutool-script 脚本执行封装,例如Javascript +> - hutool-setting 功能更强大的Setting配置文件和Properties封装 +> - hutool-system 系统参数调用封装(JVM信息等) +> - hutool-json JSON实现 +> - hutool-captcha 图片验证码实现 From c406021ec597c14a9228f54f4fd443ff58ac4307 Mon Sep 17 00:00:00 2001 From: runbeyondmove Date: Wed, 28 Mar 2018 23:04:21 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application-dev.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties index 71aa3d9b0..65e8c8995 100644 --- a/src/main/resources/application-dev.properties +++ b/src/main/resources/application-dev.properties @@ -2,5 +2,5 @@ # 数据源配置,请修改为你项目的实际配置 spring.datasource.url=jdbc:mysql://localhost:3306/test spring.datasource.username=root -spring.datasource.password=123456 +spring.datasource.password=root spring.datasource.driver-class-name=com.mysql.jdbc.Driver From 79e32fbc7419a3c2d5df0514d9e0655df825d5b1 Mon Sep 17 00:00:00 2001 From: runbeyondmove Date: Wed, 28 Mar 2018 23:17:43 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=88=86=E6=94=AF?= =?UTF-8?q?=E7=9A=84push?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "\350\241\245\345\205\205.md" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/\350\241\245\345\205\205.md" "b/\350\241\245\345\205\205.md" index 5077533da..7114f3b46 100644 --- "a/\350\241\245\345\205\205.md" +++ "b/\350\241\245\345\205\205.md" @@ -39,7 +39,7 @@ 10. hutool工具包模块 -> 一个Java基础工具类,对文件、流、加密解密、转码、正则、线程、XML等JDK方法进行封装,组成各种Util工具类,同时提供以下组件: +一个Java基础工具类,对文件、流、加密解密、转码、正则、线程、XML等JDK方法进行封装,组成各种Util工具类,同时提供以下组件: > - hutool-aop JDK动态代理封装,提供非IOC下的切面支持 > - hutool-bloomFilter 布隆过滤,提供一些Hash算法的布隆过滤 From 6c5939bc47511448c715613848bbdd5b57daeaf6 Mon Sep 17 00:00:00 2001 From: runbeyondmove Date: Wed, 28 Mar 2018 23:23:12 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=B5=8B=E8=AF=95Collection=E5=88=86?= =?UTF-8?q?=E6=94=AF=E7=9A=84push?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "\350\241\245\345\205\205.md" | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git "a/\350\241\245\345\205\205.md" "b/\350\241\245\345\205\205.md" index 7114f3b46..21f2d9104 100644 --- "a/\350\241\245\345\205\205.md" +++ "b/\350\241\245\345\205\205.md" @@ -38,8 +38,7 @@ https://github.com/lihengming/spring-boot-api-project-seed/issues/8 10. hutool工具包模块 - -一个Java基础工具类,对文件、流、加密解密、转码、正则、线程、XML等JDK方法进行封装,组成各种Util工具类,同时提供以下组件: + 一个Java基础工具类,对文件、流、加密解密、转码、正则、线程、XML等JDK方法进行封装,组成各种Util工具类,同时提供以下组件: > - hutool-aop JDK动态代理封装,提供非IOC下的切面支持 > - hutool-bloomFilter 布隆过滤,提供一些Hash算法的布隆过滤