不用创建新的类,也不用提供main函数,也不用创建类的实例,就可以直接执行一个方法 加了@Test注解的方法,可以通过单元测试(junit)框架测试该方法。底层会创建该方法所在类的实例,通过实例调用该方法。 (1)方法必须是公共的 public(2)方法必须是非静态的(3)方法必须是无返回值的 vo ...
分类:
编程语言 时间:
2020-05-30 01:03:50
阅读次数:
78
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.jupiter.api.Test; publ ...
分类:
移动开发 时间:
2020-05-29 23:35:08
阅读次数:
85
什么是mybatis MyBatis 是支持普通 SQL查询,存储过程和高级映射的优秀持久层框架。MyBatis 消除了几乎所有的JDBC代码和参数的手工设置以及结果集的检索。MyBatis 使用简单的 XML或注解用于配置和原始映射,将接口和 Java 的POJOs(Plain Ordinary ...
分类:
其他好文 时间:
2020-05-29 11:56:28
阅读次数:
71
本教程源码请访问:tutorial_demo 在《Spring04_IOC和DI实战》当中,我们使用XML配置的方式结合Apache Commons DbUtils实现单表的CRUD操作,这篇教程我们使用纯注解方式结合Apache Commons DbUtils实现单表的CRUD操作。 一、需求和技 ...
分类:
编程语言 时间:
2020-05-28 12:46:25
阅读次数:
59
1.读取 2.数据预处理 3.数据划分—训练集和测试集数据划分 from sklearn.model_selection import train_test_split x_train,x_test, y_train, y_test = train_test_split(data, target, ...
分类:
其他好文 时间:
2020-05-27 13:40:14
阅读次数:
82
1.读取 2.数据预处理 3.数据划分—训练集和测试集数据划分 from sklearn.model_selection import train_test_split x_train,x_test, y_train, y_test = train_test_split(data, target, ...
分类:
其他好文 时间:
2020-05-27 09:25:14
阅读次数:
77
一、相关注解 @GetMapping:等价于@RequestMapping(method=RequestMethod.GET) @PostMapping:等价于@RequestMapping(method=RequestMethod.POST) @PutMapping:等价于@RequestMapp ...
分类:
其他好文 时间:
2020-05-26 20:41:31
阅读次数:
68
#1、Spring源码下载 首先下载spring的源码,下载地址如下: 点击自己想下载的版本,点击后下载第一个dist.zip文件即可。 spring源码 #2、将spring的jar包导入项目 1、先将下载好的spring压缩包解压到某个文件夹 2、在eclipse中建立一个空的Dynamic w ...
分类:
编程语言 时间:
2020-05-26 18:01:45
阅读次数:
92
在HttpClient 4.x版本中引入了大量的构造器设计模式 https请求建立详解 首先建立一个信任任何密钥的策略。代码很简单,不去考虑证书链和授权类型,均认为是受信任的: class AnyTrustStrategy implements TrustStrategy{ @Override pu ...
分类:
Web程序 时间:
2020-05-26 17:59:30
阅读次数:
86
1.读取 2.数据预处理 3.数据划分—训练集和测试集数据划分 from sklearn.model_selection import train_test_split x_train,x_test, y_train, y_test = train_test_split(data, target, ...
分类:
其他好文 时间:
2020-05-25 19:27:04
阅读次数:
61