自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

原创 layui-table和viewer.js搭配使用

table.render({ elem: '#farmpurchase-table', url: '', method: 'GET', where: { userId: config.getUser().userId, access_token: config.getToken().access_token },

2021-03-13 09:56:04 723

原创 spring-security(登录)

pom文件 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> <dependency> <groupId>o

2021-01-22 12:10:11 115 1

转载 在centos下启动nginx出现Failed to start nginx.service:unit not found

错误的原因就是没有添加nginx服务,所以启动失败。解决方法:在/root/etc/init.d/目录下新建文件,文件名为nginx或者用命令在根目录下执行:# vim /etc/init.d/nginx (注意vim旁边有一个空格)插入以下代码#!/bin/sh# nginx - this script starts and stops the nginx daemin## chkconfig: - 85 15# description: Nginx is an H

2020-12-29 19:31:33 655

原创 spring-data-jpa(单表复杂查询)

上一篇:多表联查和新增——多对多在customer表里新增四条数据求得以下查询结果select * from customer where name like '%a%' and cust_id < 12在服务实现层@Override public Page findBySpecification() { Specification specification = new Specification() { @SneakyThrows

2020-12-28 20:54:18 440

原创 spring-data-jpa(多表联查和新增——多对多)

上一篇:多表联查和新增——一对多新建实体类@Entity@Table(name = "role")public class Role { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "role_id") private Long roleId; @Column(name = "role_name") private String roleName;

2020-12-28 20:43:20 597

原创 spring-data-jpa(多表联查和新增——一对多)

上一篇:分页、排序创建实体类(一对多中多的一方)@Entity@Table(name = "link_man")public class LinkMan { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "lkm_id") private Long lkmId; public Long getLkmId() { return lkmId; }

2020-12-28 20:32:21 959

原创 spring-data-jpa(分页、排序、分组)

参考单表增删改查插入四条数据服务实现层每页两条数据,第一页,按name倒序排序 @Override public Page findBySpecification() { Specification specification = new Specification() { @SneakyThrows @Override public Predicate toPredicate(Root root

2020-12-28 20:03:40 1385 1

原创 spring-data-jpa(单表增删改查)

请先参考建表dao层import com.example.demo.entity.Customer;import org.springframework.data.jpa.repository.JpaRepository;import org.springframework.data.jpa.repository.JpaSpecificationExecutor;public interface CustomerDao extends JpaRepository<Customer,Lon

2020-12-28 19:52:12 317

原创 spring-data-jpa(创建数据库表)

建表实体类@Entity@Table(name = "customer")@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler"})public class Customer { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "cust_id") private Long custId;.

2020-12-28 19:39:38 518 2

原创 html对齐总结

1.div居中margin-left和margin-right-auto<body><div style=""> <div style="width: 500px;height: 30px;margin-left: auto;margin-right: auto;background-color: green"></div></div></body>效果margin-auto<body>&l

2020-10-13 15:50:20 3366

原创 去掉html页面四周的空白

给body标签设定内外边距为0的样式<body style="margin:0px;padding:0px;"></body>

2020-10-09 17:23:45 726

原创 mysql定时任务

定时刷新mysql某个表的字段,在0,1,2之间切换建表numberCREATE TABLE `number` ( `id` int DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;创建存储过程CREATE DEFINER=`root`@`localhost` PROCEDURE `NewProc`( )BEGIN#Routine body goes here...DECLARE

2020-10-09 16:38:06 88

原创 idea导入web项目后用tomcat运行

将项目导入到idea中一直点击next到最后的finish编辑项目结构删除所有存在的jar包添加jar包到webroot/web-inf下的lib上添加jar包上面改为该项目下的web.xml文件下面改为webroot文件夹最后点击ok编辑tomcat设置运行项目...

2020-09-18 16:05:10 342

原创 统计过去N天内每天的某一项数据的总和

有一张表work,每天记录着一个团队不同人的工作量。数据如下所示workdateuserid52020-01-05 10:00:36172020-01-05 10:22:36282020-01-06 10:33:361102020-01-06 10:44:363现在统计每天这个团队付出的工作量的总和 SELECT sum(`work`) as `work`, substring( `date`, 6, 5 ) AS `date`

2020-08-04 17:27:15 283

原创 将一维json数组变为二维json数组

@RequestMapping("/getCustomers") public List getCustomers() { List<Customer> customers = new ArrayList(); customers.add(new Customer("male", "Amy", "China")); customers.add(new Customer("female", "Tom", "England")); ..

2020-08-04 17:04:09 485

原创 前端元素居中总结

div内有多个div<style> .flex-center { padding: 8px; display: flex; justify-content: center; border: 2px dashed #f69c55; } .flex-center >div { padding: 8px; .

2020-08-04 16:26:29 184

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除