Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

合并Collection到master #106

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@
<version>1.3.5</version>
<scope>test</scope>
</dependency>

<!-- http://maven.aliyun.com/nexus/content/groups/public/cn/hutool/hutool-all/ -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>4.0.8</version>
</dependency>
</dependencies>

<build>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-dev.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
58 changes: 58 additions & 0 deletions 补充.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
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

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 图片验证码实现