springboot 整合数据库demo,以便复用,使用了lombok,需要安装对应的插件,不过最新版的idea是默认支持lombok的
user类
that ok
spring-boot-starter-mail
添加
pageHelger
分页插件
上传添加github.sql
http://localhost:8081/swagger-ui.html
默认集成了下面这两个
@Autowired
private StringRedisTemplate stringRedisTemplate;
@Autowired
private RedisTemplate redisTemplate;
添加分布式锁
// 对应redis的配置
com.ocean.redis
// 对应redis分布式锁工具类
com.ocean.redis.lock
lock2 https://www.cnblogs.com/liuyang0/p/6744076.html
com.ocean.mongo.MongodbController
基本的增删改查
不是很了解,待研究 com.ocean.rabbitmq
jar包位置 src\test\java\wiremock\lib
java -jar wiremock-standalone-2.23.2.jar --port 8888
指定解析目录为templates
spring:
freemarker:
allow-request-override: false
cache: false
check-template-location: true
charset: UTF-8
content-type: text/html; charset=utf-8
expose-request-attributes: false
expose-session-attributes: false
expose-spring-macro-helpers: false
suffix: .html
template-loader-path: classpath:/templates
路径com.ocean.pdf
<!--pdf配置-->
<dependency>
<groupId>net.sf.cssbox</groupId>
<artifactId>pdf2dom</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.12</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox-tools</artifactId>
<version>2.0.12</version>
</dependency>
com.ocean.aspect.MyControllerAdvice
// 返回error页面
com.ocean.mvc.controller.indexController.testControllerAdvice1
// 返回json数据
com.ocean.mvc.controller.indexController.testControllerAdvice2