将org.springframework.test包添加到netbeans中的spring-2.5.6-SEC01.jar中
这可能非常简单,但我无法让它发挥作用。我想使用 org.springframework.test
包中的 AbstractDependencyInjectionSpringContextTest
类。 Netbeans的spring库中不包含这个包,所以我想添加它。所以到目前为止我尝试过的是:
将“test”目录(从 spring 下载)复制并粘贴到 Netbeans 的 spring-2.5.6-SEC01.jar 文件中(将其复制到该 jar 中的 org.springframework 目录,以便我可以使用 org.springframework.test 导入它)。如果我转到 Netbeans 中的项目/库,它就在那里,但是当我尝试导入 org.springframework.test.*; 时自动编译没有给我从 org.soringframework 包中选择测试目录的选项。
创建一个指向“test”目录的新库并将其添加到项目中 - 因为“test”中没有任何 jar 文件,我不确定应该使用什么路径来导入它。
我很确定这是非常简单的事情,但我仍然是新手,无法弄清楚。
This is probably very simple, however I can't get this to work. I want to use AbstractDependencyInjectionSpringContextTest
class which is in org.springframework.test
package. This package is not included in Netbeans' spring library, so I want to add it. So what I have tried so far is:
copy and paste "test" directory (downloaded from spring) into the Netbeans' spring-2.5.6-SEC01.jar file (copy it to org.springframework directory in that jar so I can use org.springframework.test to import it). If I go to project/libraries in Netbeans it is there, but when I try to import org.springframework.test.*; the autocomplition doesn't give me the option to choose test directory from org.soringframework package.
create a new library which points to "test" directory and add it to the project- as there is no any jar file in "test" I'm not sure what path should I use to import it.
I'm pretty sure this is something very simple but I'm still a novice and can't figure this out.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据grepcode,
spring-2.5.6-SEC01.jar
中不包含测试包。您需要下载 spring-test-2.5.6。 SEC01.jar。According to grepcode, the test package is not included in
spring-2.5.6-SEC01.jar
. You need to download spring-test-2.5.6.SEC01.jar.