学习写代码呀

导航

2020年3月11日 #

JPARepository

摘要: JpaSpecificationExecutor 通过查询条件查询 方法 Optional<T> findOne(@Nullable Specification<T> spec):根据条件查询 findAll:查询所有 List<T> findAll(@Nullable Specification< 阅读全文

posted @ 2020-03-11 13:41 学习写代码呀 阅读(579) 评论(0) 推荐(0) 编辑

电脑常识

摘要: 选电脑: 电脑有办公本和游戏本的区别。办公本更美观轻巧但性能更低。游戏本又厚又重但性能高一些,风扇声音更大。发热:出风口和入风口;电脑过热会损坏cpu;性能模式:默认使用电池时节能模式,耗电少但性能慢一些;高性能模式适合插上电源,耗电多性能更快。电脑硬件:显卡中独立显卡更好,但是一般办公集成显卡也足 阅读全文

posted @ 2020-03-11 10:25 学习写代码呀 阅读(168) 评论(0) 推荐(0) 编辑

2020年1月12日 #

eclipse使用maven报错

摘要: 打开项目pom文件报错空指针: java.lang.NullPointerException at org.eclipse.wst.sse.ui.internal.contentou 看了很多解决方法,说是项目空间有问题,最简单的方法是删掉.metadata文件夹重启。 maven编译报错: Plu 阅读全文

posted @ 2020-01-12 13:18 学习写代码呀 阅读(202) 评论(0) 推荐(0) 编辑

2020年1月9日 #

hibernate Criterion和Criteria

摘要: Hibernate Criterion是Criteria的查询条件。Criteria 提供了add(Criterion criterion)方法来添加查询条件。Criteria 的特点来方便地进行查询条件的组装。 Criteria的常用方法: 1. 创建一个Criteria 实例 org.hiber 阅读全文

posted @ 2020-01-09 10:48 学习写代码呀 阅读(743) 评论(0) 推荐(0) 编辑

java8 .stream().map().collect()

摘要: steam():把一个源数据,可以是集合,数组,I/O channel, 产生器generator 等,转化成流。 mylist.stream() .map(myfunction->{ return item; }).collect(Collectors.toList()); forEach():迭 阅读全文

posted @ 2020-01-09 10:46 学习写代码呀 阅读(7009) 评论(0) 推荐(0) 编辑

sql索引

摘要: SQL索引有两种,聚集索引和非聚集索引,索引主要目的是提高了SQL Server系统的性能,加快数据的查询速度与减少系统的响应时间。 SQL创建索引和删除索引 使用CREATE 语句创建索引CREATE INDEX index_name ON table_name(column_name,colum 阅读全文

posted @ 2020-01-09 10:39 学习写代码呀 阅读(406) 评论(0) 推荐(0) 编辑

jdbc连接数据库

摘要: package test;import java.io.IOException;import java.io.InputStream;import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedSt 阅读全文

posted @ 2020-01-09 10:38 学习写代码呀 阅读(142) 评论(0) 推荐(0) 编辑

读取配置文件内容

摘要: 1、springboot读取配置文件:a、读取默认的application.yml在属性通过注解注入@Value("${demo.name}")public String name;@Value("${demo.age}")public String age;b、通过配置类注入bean@Compon 阅读全文

posted @ 2020-01-09 10:24 学习写代码呀 阅读(1454) 评论(0) 推荐(0) 编辑

2020年1月6日 #

学习spock测试框架

摘要: spock是一个单元测试框架,类似于junit,可以用java和groovy写。 依赖: <dependency> <groupId>org.spockframework</groupId> <artifactId>spock-core</artifactId> <version>1.2-groov 阅读全文

posted @ 2020-01-06 13:53 学习写代码呀 阅读(327) 评论(0) 推荐(0) 编辑

2019年12月30日 #

Caused by: org.xml.sax.SAXParseException: Premature end of file.

摘要: java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext(Cac 阅读全文

posted @ 2019-12-30 09:41 学习写代码呀 阅读(2252) 评论(0) 推荐(0) 编辑