依赖作用域之<scope>test</scope>

经常在代码中看到依赖的作用域为<scope>test</scope>,它的作用是,只能在test目录(通过右键->Make Directory as->Test Sources Root来标记)下的类中导入(即import xxx)依赖中的内容;否则在main->java目录(Sources Root标记的)下就无法导入

 

posted @ 2019-12-08 16:12  请叫我小老弟  阅读(10444)  评论(0编辑  收藏  举报