- 自己下载好jar包
- file->project structure
注意:junit 单元测试报错:java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing–》4.11以上版本不在包含hamcrest。
方法:
1.junit版本降到4.10
2.导入hamcrest-core-1.3.jar
下载链接:
https://mvnrepository.com/artifact/org.hamcrest/hamcrest-core/1.3