![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
springboot
文章平均质量分 90
silence_xiang
这个作者很懒,什么都没留下…
展开
-
QueryDSL-在springboot中使用querydsl
pom.xml添加依赖<dependencies> <!--QueryDsl start==============================--> <dependency> <groupId>com.querydsl</groupId> <artifactI...原创 2019-12-11 11:33:43 · 796 阅读 · 0 评论 -
Springboot-从0开始教你在centos7中使用jenkins,git和maven自动构建部署springboot项目
参考文章参考1.安装git maven jenkins安装git和maven比较简单,这一步可自行百度安装jenkins如果没有wget命令就通过yum install wget安装sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.reposudo...原创 2019-12-10 11:00:21 · 412 阅读 · 0 评论 -
Springboot-结合ehcache实现文章浏览量功能(通过ip唯一)
背景想要实现一个单机应用,就是普通的浏览量功能实现,如果同一个ip地址点击的文章多次的话,只能算是一次点击,因为是分布式,所以不想安装Redis服务。EhCache 是一个纯Java的进程内缓存框架,具有快速、精干等特点,是Hibernate中默认的CacheProvider。所以自己实现了一个使用缓存添加浏览量的功能,减少服务器的负担,要经常操作数据库。前提条件添加依赖 版本2.6....原创 2019-12-02 19:35:17 · 588 阅读 · 0 评论 -
Springboot-上传图片并保存路径到数据库
图片文章关联实体@Entity@Table(name = "article_picture")public class ArticlePictureEntity extends BaseEntity implements Serializable { /** * 图片地址 */ private String url; /** * 文章...原创 2019-12-02 19:10:48 · 5466 阅读 · 49 评论 -
SpringDataJpa-多表关联查询并返回自定义对象
想实现的SQLSELECT it.`id`, it.`item_name`,si.`item_number` FROM item it LEFT JOIN sale_item si ON (it.`id` = si.item_id) WHERE si.`sale_id`=1就是一个简单的左连接关联查询实体/** * @Description 订单实体 * @Author yuxian...原创 2019-11-25 10:46:44 · 1336 阅读 · 0 评论 -
SpringDataJpa-动态查询并且分页
1.商品实体/** * @Description 商品实体 * @Author yuxiang * @CreatedDate 2019/10/30 12:04 */@Entity@Table(name = "item")@Datapublic class ItemEntity extends BaseEntity implements Serializable { /*...原创 2019-11-14 15:48:57 · 269 阅读 · 0 评论 -
QueryDSL-findbyIdIn并做统计查询,提高效率
public Map findbyIds(List<String> ids){ Predicate predicate1 = QContent.id.in(ids).and(QContent.infoSourceType.eq("微博")); Predicate predicate2 = QContent.id.in(ids).and(QContent.infoSou...原创 2019-10-23 19:09:48 · 1071 阅读 · 0 评论